LazyDecoder

Trait LazyDecoder 

Source
pub(super) trait LazyDecoder: BlobDecoder {
    // Required methods
    fn set_lazy_state(&mut self, state: LazyState);
    fn get_lazy_state(&self) -> LazyState;

    // Provided methods
    fn read_lazy<T>(&mut self) -> LazyValue<T> { ... }
    fn read_lazy_array<T>(&mut self, len: usize) -> LazyArray<T> { ... }
    fn read_lazy_table<I, T>(
        &mut self,
        width: usize,
        len: usize,
    ) -> LazyTable<I, T> { ... }
    fn read_lazy_offset_then<T>(&mut self, f: impl Fn(NonZero<usize>) -> T) -> T { ... }
}
Expand description

This trait abstracts over decoders that can decode lazy values using LazyState:

Required Methods§

Provided Methods§

Source

fn read_lazy<T>(&mut self) -> LazyValue<T>

Source

fn read_lazy_array<T>(&mut self, len: usize) -> LazyArray<T>

Source

fn read_lazy_table<I, T>(&mut self, width: usize, len: usize) -> LazyTable<I, T>

Source

fn read_lazy_offset_then<T>(&mut self, f: impl Fn(NonZero<usize>) -> T) -> T

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.

Implementors§