Struct constriction::Queue

source ·
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: Clone, Buf: AsRef<[Word]>> BoundedReadWords<Word, Queue> for Cursor<Word, Buf>

source§

fn remaining(&self) -> usize

Returns the number of Words that are left for reading. Read more
source§

fn is_exhausted(&self) -> bool

Whether or not there is no data left to read. Read more
source§

impl<Word, B: BoundedReadWords<Word, Stack>> BoundedReadWords<Word, Queue> for Reverse<B>

source§

fn remaining(&self) -> usize

Returns the number of Words that are left for reading. Read more
source§

fn is_exhausted(&self) -> bool

Whether or not there is no data left to read. Read more
source§

impl Debug for Queue

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Queue

source§

fn default() -> Queue

Returns the “default value” for a type. Read more
source§

impl<Word: BitArray, B: ReadWords<Word, Queue>> ReadBitStream<Queue> for QueueDecoder<Word, B>

§

type ReadError = <B as ReadWords<Word, Queue>>::ReadError

source§

fn decode_symbol<C: DecoderCodebook>( &mut self, codebook: C ) -> Result<C::Symbol, CoderError<SymbolCodeError<C::InvalidCodeword>, Self::ReadError>>

source§

fn read_bit(&mut self) -> Result<Option<bool>, Self::ReadError>

source§

fn decode_symbols<'s, I, C>( &'s mut self, codebooks: I ) -> DecodeSymbols<'s, Self, I, S>
where I: IntoIterator<Item = C> + 's, C: DecoderCodebook,

source§

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>

§

type ReadError = Infallible

The error type that can occur when reading from the data source, or Infallible. Read more
source§

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 more
source§

fn maybe_exhausted(&self) -> bool

Returns true if the data source could be out of data. Read more
source§

impl<Word, B: ReadWords<Word, Stack>> ReadWords<Word, Queue> for Reverse<B>

§

type ReadError = <B as ReadWords<Word, Stack>>::ReadError

The error type that can occur when reading from the data source, or Infallible. Read more
source§

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 more
source§

fn maybe_exhausted(&self) -> bool

Returns true if the data source could be out of data. Read more
source§

impl<Word: BitArray, B: WriteWords<Word>> WriteBitStream<Queue> for QueueEncoder<Word, B>

§

type WriteError = <B as WriteWords<Word>>::WriteError

source§

fn write_bit(&mut self, bit: bool) -> Result<(), Self::WriteError>

source§

fn encode_symbol<Symbol, C>( &mut self, symbol: Symbol, codebook: C ) -> Result<(), CoderError<DefaultEncoderFrontendError, Self::WriteError>>
where C: EncoderCodebook, Symbol: Borrow<C::Symbol>,

source§

fn encode_symbols<Symbol, C>( &mut self, symbols_and_codebooks: impl IntoIterator<Item = (Symbol, C)> ) -> Result<(), CoderError<DefaultEncoderFrontendError, Self::WriteError>>
where C: EncoderCodebook, Symbol: Borrow<C::Symbol>,

source§

fn encode_iid_symbols<Symbol, C>( &mut self, symbols: impl IntoIterator<Item = Symbol>, codebook: &C ) -> Result<(), CoderError<DefaultEncoderFrontendError, Self::WriteError>>
where C: EncoderCodebook, Symbol: Borrow<C::Symbol>,

source§

impl Semantics for Queue

Auto Trait Implementations§

§

impl RefUnwindSafe for Queue

§

impl Send for Queue

§

impl Sync for Queue

§

impl Unpin for Queue

§

impl UnwindSafe for Queue

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<'a, Word, Buf> AsReadWords<'a, Word, Queue> for Buf
where Word: Clone + 'a, Buf: AsRef<[Word]> + 'a,

§

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

Performs the (temporary) conversion.
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<Word, Buf> IntoReadWords<Word, Queue> for Buf
where Word: Clone, Buf: AsRef<[Word]>,

§

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

Performs the conversion.
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.