Struct constriction::Stack [−][src]
pub struct Stack {}
Expand description
Zero sized marker trait for last-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 stack, check out
the module stream::stack
.
Trait Implementations
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.
Performs the (temporary) conversion.
type IntoReadWords = Cursor<Word, Buf>
type IntoReadWords = Cursor<Word, Buf>
The type of the data source that will result from the conversion.
Performs the conversion.
fn decode_symbol<C: DecoderCodebook>(
&mut self,
codebook: C
) -> Result<C::Symbol, CoderError<SymbolCodeError<C::InvalidCodeword>, Self::ReadError>>
fn decode_symbols<'s, I, C>(
&'s mut self,
codebooks: I
) -> DecodeSymbols<'s, Self, I, S>ⓘNotable traits for DecodeSymbols<'a, Stream, I, S>impl<'a, Stream, I, C, S> Iterator for DecodeSymbols<'a, Stream, I, S> where
S: Semantics,
Stream: ReadBitStream<S>,
C: DecoderCodebook,
I: Iterator<Item = C>, type Item = Result<C::Symbol, CoderError<SymbolCodeError<C::InvalidCodeword>, Stream::ReadError>>;
where
I: IntoIterator<Item = C> + 's,
C: DecoderCodebook,
impl<'a, Stream, I, C, S> Iterator for DecodeSymbols<'a, Stream, I, S> where
S: Semantics,
Stream: ReadBitStream<S>,
C: DecoderCodebook,
I: Iterator<Item = C>, type Item = Result<C::Symbol, CoderError<SymbolCodeError<C::InvalidCodeword>, Stream::ReadError>>;
fn decode_iid_symbols<'a, C>(
&'a mut self,
amt: usize,
codebook: &'a C
) -> DecodeSymbols<'a, Self, Take<Repeat<&'a C>>, S>ⓘNotable traits for DecodeSymbols<'a, Stream, I, S>impl<'a, Stream, I, C, S> Iterator for DecodeSymbols<'a, Stream, I, S> where
S: Semantics,
Stream: ReadBitStream<S>,
C: DecoderCodebook,
I: Iterator<Item = C>, type Item = Result<C::Symbol, CoderError<SymbolCodeError<C::InvalidCodeword>, Stream::ReadError>>;
where
C: DecoderCodebook,
impl<'a, Stream, I, C, S> Iterator for DecodeSymbols<'a, Stream, I, S> where
S: Semantics,
Stream: ReadBitStream<S>,
C: DecoderCodebook,
I: Iterator<Item = C>, type Item = Result<C::Symbol, CoderError<SymbolCodeError<C::InvalidCodeword>, Stream::ReadError>>;
type ReadError = Infallible
type ReadError = Infallible
The only way how reading from a vector can fail is if the vector is empty, but
that’s not considered an error (it returns Ok(None)
instead).
Pops the word off the end of the vector (= top of the stack). If you instead want to
keep the data unchanged (e.g., because you want to reuse it later) then wrap either
the vector v
or or the slice &v[..]
in a Cursor
.
Returns true
if the data source could be out of data. Read more
type ReadError = Infallible
type ReadError = Infallible
The only way how reading from a vector can fail is if the vector is empty, but
that’s not considered an error (it returns Ok(None)
instead).
Pops the word off the end of the vector (= top of the stack). If you instead want to
keep the data unchanged (e.g., because you want to reuse it later) then wrap either
the vector v
or or the slice &v[..]
in a Cursor
.
Returns true
if the data source could be out of data. Read more
The error type that can occur when reading from the data source, or Infallible
. Read more
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
Returns true
if the data source could be out of data. Read more
type ReadError = Infallible
type ReadError = Infallible
The error type that can occur when reading from the data source, or Infallible
. Read more
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
Returns true
if the data source could be out of data. Read more