pub struct Queue {}
Expand description
Zero sized marker struct for first-in-first-out read/write Semantics
This type typically only comes up in advanced use cases that are generic over read/write
semantics. If you are looking for an entropy coder that operates as a queue, check out
the module stream::queue
.
Trait Implementations§
Source§impl<Word, B: BoundedReadWords<Word, Stack>> BoundedReadWords<Word, Queue> for Reverse<B>
impl<Word, B: BoundedReadWords<Word, Stack>> BoundedReadWords<Word, Queue> for Reverse<B>
Source§impl<Word: BitArray, B: ReadWords<Word, Queue>> ReadBitStream<Queue> for QueueDecoder<Word, B>
impl<Word: BitArray, B: ReadWords<Word, Queue>> ReadBitStream<Queue> for QueueDecoder<Word, B>
type ReadError = <B as ReadWords<Word, Queue>>::ReadError
fn decode_symbol<C: DecoderCodebook>( &mut self, codebook: C, ) -> Result<C::Symbol, CoderError<SymbolCodeError<C::InvalidCodeword>, Self::ReadError>>
fn read_bit(&mut self) -> Result<Option<bool>, Self::ReadError>
fn decode_symbols<'s, I, C>(
&'s mut self,
codebooks: I,
) -> DecodeSymbols<'s, Self, I, S> ⓘwhere
I: IntoIterator<Item = C> + 's,
C: DecoderCodebook,
fn decode_iid_symbols<'a, C>(
&'a mut self,
amt: usize,
codebook: &'a C,
) -> DecodeSymbols<'a, Self, Take<Repeat<&'a C>>, S> ⓘwhere
C: DecoderCodebook,
Source§impl<Word: Clone, Buf: AsRef<[Word]>> ReadWords<Word, Queue> for Cursor<Word, Buf>
impl<Word: Clone, Buf: AsRef<[Word]>> ReadWords<Word, Queue> for Cursor<Word, Buf>
Source§type ReadError = Infallible
type ReadError = Infallible
The error type that can occur when reading from the data source, or
Infallible
. Read moreSource§fn read(&mut self) -> Result<Option<Word>, Self::ReadError>
fn read(&mut self) -> Result<Option<Word>, Self::ReadError>
Reads a single
Word
from the data source and advances the state of the data source
accordingly (i.e., so that the next read
won’t read the same Word
again). Read moreSource§fn maybe_exhausted(&self) -> bool
fn maybe_exhausted(&self) -> bool
Returns
true
if the data source could be out of data. Read moreSource§impl<Word, B: ReadWords<Word, Stack>> ReadWords<Word, Queue> for Reverse<B>
impl<Word, B: ReadWords<Word, Stack>> ReadWords<Word, Queue> for Reverse<B>
Source§type ReadError = <B as ReadWords<Word, Stack>>::ReadError
type ReadError = <B as ReadWords<Word, Stack>>::ReadError
The error type that can occur when reading from the data source, or
Infallible
. Read moreSource§fn read(&mut self) -> Result<Option<Word>, Self::ReadError>
fn read(&mut self) -> Result<Option<Word>, Self::ReadError>
Reads a single
Word
from the data source and advances the state of the data source
accordingly (i.e., so that the next read
won’t read the same Word
again). Read moreSource§fn maybe_exhausted(&self) -> bool
fn maybe_exhausted(&self) -> bool
Returns
true
if the data source could be out of data. Read moreSource§impl<Word: BitArray, B: WriteWords<Word>> WriteBitStream<Queue> for QueueEncoder<Word, B>
impl<Word: BitArray, B: WriteWords<Word>> WriteBitStream<Queue> for QueueEncoder<Word, B>
type WriteError = <B as WriteWords<Word>>::WriteError
fn write_bit(&mut self, bit: bool) -> Result<(), Self::WriteError>
fn encode_symbol<Symbol, C>( &mut self, symbol: Symbol, codebook: C, ) -> Result<(), CoderError<DefaultEncoderFrontendError, Self::WriteError>>
fn encode_symbols<Symbol, C>( &mut self, symbols_and_codebooks: impl IntoIterator<Item = (Symbol, C)>, ) -> Result<(), CoderError<DefaultEncoderFrontendError, Self::WriteError>>
fn encode_iid_symbols<Symbol, C>( &mut self, symbols: impl IntoIterator<Item = Symbol>, codebook: &C, ) -> Result<(), CoderError<DefaultEncoderFrontendError, Self::WriteError>>
impl Semantics for Queue
Auto Trait Implementations§
impl Freeze for Queue
impl RefUnwindSafe for Queue
impl Send for Queue
impl Sync for Queue
impl Unpin for Queue
impl UnwindSafe for Queue
Blanket Implementations§
Source§impl<'a, Word, Buf> AsReadWords<'a, Word, Queue> for Buf
impl<'a, Word, Buf> AsReadWords<'a, Word, Queue> for Buf
Source§type AsReadWords = Cursor<Word, &'a [Word]>
type AsReadWords = Cursor<Word, &'a [Word]>
The type of the data source as which the original type can be used.
Source§fn as_read_words(&'a self) -> <Buf as AsReadWords<'a, Word, Queue>>::AsReadWords
fn as_read_words(&'a self) -> <Buf as AsReadWords<'a, Word, Queue>>::AsReadWords
Performs the (temporary) conversion.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<Word, Buf> IntoReadWords<Word, Queue> for Buf
impl<Word, Buf> IntoReadWords<Word, Queue> for Buf
Source§type IntoReadWords = Cursor<Word, Buf>
type IntoReadWords = Cursor<Word, Buf>
The type of the data source that will result from the conversion.
Source§fn into_read_words(self) -> <Buf as IntoReadWords<Word, Queue>>::IntoReadWords
fn into_read_words(self) -> <Buf as IntoReadWords<Word, Queue>>::IntoReadWords
Performs the conversion.