Trait RandomAccessDecoderFactory

Source
pub trait RandomAccessDecoderFactory {
    type Decoder<'a>: Decode + 'a
       where Self: 'a;

    // Required method
    fn new_decoder(&self, node: usize) -> Result<Self::Decoder<'_>>;
}
Expand description

A trait providing decoders with random access.

Required Associated Types§

Source

type Decoder<'a>: Decode + 'a where Self: 'a

Required Methods§

Source

fn new_decoder(&self, node: usize) -> Result<Self::Decoder<'_>>

Creates a new reader starting at the given node.

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<T: RandomAccessDecoderFactory + ?Sized> RandomAccessDecoderFactory for &T

Source§

type Decoder<'a> = <T as RandomAccessDecoderFactory>::Decoder<'a> where Self: 'a

Source§

fn new_decoder(&self, node: usize) -> Result<Self::Decoder<'_>>

Source§

impl<T: RandomAccessDecoderFactory + ?Sized> RandomAccessDecoderFactory for Box<T>

Source§

type Decoder<'a> = <T as RandomAccessDecoderFactory>::Decoder<'a> where Self: 'a

Source§

fn new_decoder(&self, node: usize) -> Result<Self::Decoder<'_>>

Implementors§

Source§

impl<E: Endianness, F: CodesReaderFactoryHelper<E>, OFF: IndexedSeq<Input = usize, Output = usize>> RandomAccessDecoderFactory for DynCodesDecoderFactory<E, F, OFF>
where for<'a> <F as CodesReaderFactory<E>>::CodesReader<'a>: BitSeek,

Source§

type Decoder<'a> = DynCodesDecoder<E, <F as CodesReaderFactory<E>>::CodesReader<'a>> where Self: 'a

Source§

impl<E: Endianness, F: CodesReaderFactoryHelper<E>, OFF: IndexedSeq<Input = usize, Output = usize>, const OUTDEGREES: usize, const REFERENCES: usize, const BLOCKS: usize, const INTERVALS: usize, const RESIDUALS: usize> RandomAccessDecoderFactory for ConstCodesDecoderFactory<E, F, OFF, OUTDEGREES, REFERENCES, BLOCKS, INTERVALS, RESIDUALS>
where for<'a> <F as CodesReaderFactory<E>>::CodesReader<'a>: BitSeek,

Source§

type Decoder<'a> = ConstCodesDecoder<E, <F as CodesReaderFactory<E>>::CodesReader<'a>> where Self: 'a