read_fonts

Trait ResolveNullableOffset

Source
pub trait ResolveNullableOffset {
    // Required methods
    fn resolve<'a, T: FontRead<'a>>(
        &self,
        data: FontData<'a>,
    ) -> Option<Result<T, ReadError>>;
    fn resolve_with_args<'a, T: FontReadWithArgs<'a>>(
        &self,
        data: FontData<'a>,
        args: &T::Args,
    ) -> Option<Result<T, ReadError>>;
}
Expand description

A helper trait providing a ‘resolve’ method for nullable offset types

Required Methods§

Source

fn resolve<'a, T: FontRead<'a>>( &self, data: FontData<'a>, ) -> Option<Result<T, ReadError>>

Source

fn resolve_with_args<'a, T: FontReadWithArgs<'a>>( &self, data: FontData<'a>, args: &T::Args, ) -> Option<Result<T, ReadError>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<O: Offset> ResolveNullableOffset for Nullable<O>

Source§

fn resolve<'a, T: FontRead<'a>>( &self, data: FontData<'a>, ) -> Option<Result<T, ReadError>>

Source§

fn resolve_with_args<'a, T: FontReadWithArgs<'a>>( &self, data: FontData<'a>, args: &T::Args, ) -> Option<Result<T, ReadError>>

Implementors§