Struct dsi_bitstream::traits::LittleEndian
source · pub struct LittleEndian;
Expand description
Selector type for little-endian streams.
Trait Implementations§
source§impl<E: Error + Send + Sync + 'static, WR: WordRead<Error = E, Word = u64> + WordSeek<Error = E>, RP: ReadParams> BitRead<LittleEndian> for BitReader<LE, WR, RP>
impl<E: Error + Send + Sync + 'static, WR: WordRead<Error = E, Word = u64> + WordSeek<Error = E>, RP: ReadParams> BitRead<LittleEndian> for BitReader<LE, WR, RP>
type Error = <WR as WordRead>::Error
source§fn skip_bits(&mut self, n_bits: usize) -> Result<(), Self::Error>
fn skip_bits(&mut self, n_bits: usize) -> Result<(), Self::Error>
Skip
n
bits from the stream. Read moresource§fn read_bits(&mut self, n_bits: usize) -> Result<u64, Self::Error>
fn read_bits(&mut self, n_bits: usize) -> Result<u64, Self::Error>
Read
n
bits and return them in the lowest bits. Read moresource§fn peek_bits(&mut self, n_bits: usize) -> Result<u32, Self::Error>
fn peek_bits(&mut self, n_bits: usize) -> Result<u32, Self::Error>
Peeks at
n
bits without advancing the stream position.
n
must be nonzero, and at most PeekWord::BITS
.fn copy_to<F: Endianness, W: BitWrite<F>>( &mut self, bit_write: &mut W, n: u64 ) -> Result<(), CopyError<Self::Error, W::Error>>
source§impl<WR: WordRead, RP: ReadParams> BitRead<LittleEndian> for BufBitReader<LE, WR, RP>where
WR::Word: DoubleType + UpcastableInto<u64>,
<<WR as WordRead>::Word as DoubleType>::DoubleType: CastableInto<u64>,
impl<WR: WordRead, RP: ReadParams> BitRead<LittleEndian> for BufBitReader<LE, WR, RP>where
WR::Word: DoubleType + UpcastableInto<u64>,
<<WR as WordRead>::Word as DoubleType>::DoubleType: CastableInto<u64>,
type Error = <WR as WordRead>::Error
§type PeekWord = <<WR as WordRead>::Word as DoubleType>::DoubleType
type PeekWord = <<WR as WordRead>::Word as DoubleType>::DoubleType
The type we can read from the stream without advancing.
source§fn peek_bits(&mut self, n_bits: usize) -> Result<Self::PeekWord, Self::Error>
fn peek_bits(&mut self, n_bits: usize) -> Result<Self::PeekWord, Self::Error>
Peeks at
n
bits without advancing the stream position.
n
must be nonzero, and at most PeekWord::BITS
.source§fn read_bits(&mut self, n_bits: usize) -> Result<u64, Self::Error>
fn read_bits(&mut self, n_bits: usize) -> Result<u64, Self::Error>
Read
n
bits and return them in the lowest bits. Read moresource§fn skip_bits(&mut self, n_bits: usize) -> Result<(), Self::Error>
fn skip_bits(&mut self, n_bits: usize) -> Result<(), Self::Error>
Skip
n
bits from the stream. Read morefn copy_to<F: Endianness, W: BitWrite<F>>( &mut self, bit_write: &mut W, n: u64 ) -> Result<(), CopyError<Self::Error, W::Error>>
source§impl<WW: WordWrite, WP: WriteParams> BitWrite<LittleEndian> for BufBitWriter<LE, WW, WP>
impl<WW: WordWrite, WP: WriteParams> BitWrite<LittleEndian> for BufBitWriter<LE, WW, WP>
type Error = <WW as WordWrite>::Error
source§fn flush(&mut self) -> Result<usize, Self::Error>
fn flush(&mut self) -> Result<usize, Self::Error>
Flush the buffer, consuming the bit stream. Read more
source§fn write_bits(
&mut self,
value: u64,
n_bits: usize
) -> Result<usize, Self::Error>
fn write_bits( &mut self, value: u64, n_bits: usize ) -> Result<usize, Self::Error>
Write the lowest
n
bits of value
to the stream and return the number
of bits written, that is, n
. Read moresource§fn write_unary(&mut self, value: u64) -> Result<usize, Self::Error>
fn write_unary(&mut self, value: u64) -> Result<usize, Self::Error>
Write
value
as a unary code to the stream and return the number of
bits written, that is, value
plus one.fn copy_from<F: Endianness, R: BitRead<F>>( &mut self, bit_read: &mut R, n: u64 ) -> Result<(), CopyError<R::Error, Self::Error>>
source§impl Clone for LittleEndian
impl Clone for LittleEndian
source§fn clone(&self) -> LittleEndian
fn clone(&self) -> LittleEndian
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for LittleEndian
impl Debug for LittleEndian
source§impl<E: Error + Send + Sync + 'static, WR: WordRead<Error = E, Word = u64> + WordSeek<Error = E>> DeltaRead<LittleEndian> for BitReader<LittleEndian, WR, DefaultReadParams>where
WR::Word: DoubleType + UpcastableInto<u64>,
<WR::Word as DoubleType>::DoubleType: CastableInto<u64>,
impl<E: Error + Send + Sync + 'static, WR: WordRead<Error = E, Word = u64> + WordSeek<Error = E>> DeltaRead<LittleEndian> for BitReader<LittleEndian, WR, DefaultReadParams>where
WR::Word: DoubleType + UpcastableInto<u64>,
<WR::Word as DoubleType>::DoubleType: CastableInto<u64>,
source§impl<WR: WordRead> DeltaRead<LittleEndian> for BufBitReader<LittleEndian, WR, DefaultReadParams>where
WR::Word: DoubleType + UpcastableInto<u64>,
<WR::Word as DoubleType>::DoubleType: CastableInto<u64>,
impl<WR: WordRead> DeltaRead<LittleEndian> for BufBitReader<LittleEndian, WR, DefaultReadParams>where
WR::Word: DoubleType + UpcastableInto<u64>,
<WR::Word as DoubleType>::DoubleType: CastableInto<u64>,
source§impl<WR: WordWrite, DC: WriteParams> DeltaWrite<LittleEndian> for BufBitWriter<LittleEndian, WR, DC>
impl<WR: WordWrite, DC: WriteParams> DeltaWrite<LittleEndian> for BufBitWriter<LittleEndian, WR, DC>
source§impl<E: Error + Send + Sync + 'static, WR: WordRead<Error = E, Word = u64> + WordSeek<Error = E>> GammaRead<LittleEndian> for BitReader<LittleEndian, WR, DefaultReadParams>where
WR::Word: DoubleType + UpcastableInto<u64>,
<WR::Word as DoubleType>::DoubleType: CastableInto<u64>,
impl<E: Error + Send + Sync + 'static, WR: WordRead<Error = E, Word = u64> + WordSeek<Error = E>> GammaRead<LittleEndian> for BitReader<LittleEndian, WR, DefaultReadParams>where
WR::Word: DoubleType + UpcastableInto<u64>,
<WR::Word as DoubleType>::DoubleType: CastableInto<u64>,
source§impl<WR: WordRead> GammaRead<LittleEndian> for BufBitReader<LittleEndian, WR, DefaultReadParams>where
WR::Word: DoubleType + UpcastableInto<u64>,
<WR::Word as DoubleType>::DoubleType: CastableInto<u64>,
impl<WR: WordRead> GammaRead<LittleEndian> for BufBitReader<LittleEndian, WR, DefaultReadParams>where
WR::Word: DoubleType + UpcastableInto<u64>,
<WR::Word as DoubleType>::DoubleType: CastableInto<u64>,
source§impl<WR: WordWrite> GammaWrite<LittleEndian> for BufBitWriter<LittleEndian, WR, DefaultWriteParams>
impl<WR: WordWrite> GammaWrite<LittleEndian> for BufBitWriter<LittleEndian, WR, DefaultWriteParams>
source§impl PartialEq for LittleEndian
impl PartialEq for LittleEndian
source§fn eq(&self, other: &LittleEndian) -> bool
fn eq(&self, other: &LittleEndian) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<E: Error + Send + Sync + 'static, WR: WordRead<Error = E, Word = u64> + WordSeek<Error = E>> ZetaRead<LittleEndian> for BitReader<LittleEndian, WR, DefaultReadParams>where
WR::Word: DoubleType + UpcastableInto<u64>,
<WR::Word as DoubleType>::DoubleType: CastableInto<u64>,
impl<E: Error + Send + Sync + 'static, WR: WordRead<Error = E, Word = u64> + WordSeek<Error = E>> ZetaRead<LittleEndian> for BitReader<LittleEndian, WR, DefaultReadParams>where
WR::Word: DoubleType + UpcastableInto<u64>,
<WR::Word as DoubleType>::DoubleType: CastableInto<u64>,
source§impl<WR: WordRead> ZetaRead<LittleEndian> for BufBitReader<LittleEndian, WR, DefaultReadParams>where
WR::Word: DoubleType + UpcastableInto<u64>,
<WR::Word as DoubleType>::DoubleType: CastableInto<u64>,
impl<WR: WordRead> ZetaRead<LittleEndian> for BufBitReader<LittleEndian, WR, DefaultReadParams>where
WR::Word: DoubleType + UpcastableInto<u64>,
<WR::Word as DoubleType>::DoubleType: CastableInto<u64>,
source§impl<WR: WordWrite, DC: WriteParams> ZetaWrite<LittleEndian> for BufBitWriter<LittleEndian, WR, DC>
impl<WR: WordWrite, DC: WriteParams> ZetaWrite<LittleEndian> for BufBitWriter<LittleEndian, WR, DC>
impl Eq for LittleEndian
impl StructuralPartialEq for LittleEndian
Auto Trait Implementations§
impl Freeze for LittleEndian
impl RefUnwindSafe for LittleEndian
impl Send for LittleEndian
impl Sync for LittleEndian
impl Unpin for LittleEndian
impl UnwindSafe for LittleEndian
Blanket Implementations§
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<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
source§impl<B> DeltaReadParam<LittleEndian> for Bwhere
B: GammaReadParam<LittleEndian>,
impl<B> DeltaReadParam<LittleEndian> for Bwhere
B: GammaReadParam<LittleEndian>,
fn read_delta_param<const USE_DELTA_TABLE: bool, const USE_GAMMA_TABLE: bool>( &mut self ) -> Result<u64, <B as BitRead<LittleEndian>>::Error>
source§impl<B> DeltaWriteParam<LittleEndian> for Bwhere
B: GammaWriteParam<LittleEndian>,
impl<B> DeltaWriteParam<LittleEndian> for Bwhere
B: GammaWriteParam<LittleEndian>,
source§impl<T> DowncastableFrom<T> for T
impl<T> DowncastableFrom<T> for T
source§fn downcast_from(value: T) -> T
fn downcast_from(value: T) -> T
Truncate the current UnsignedInt to a possibly smaller size
source§impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
source§impl<T> Endianness for Twhere
T: Endianness,
impl<T> Endianness for Twhere
T: Endianness,
source§impl<B> GammaReadParam<LittleEndian> for Bwhere
B: BitRead<LittleEndian>,
impl<B> GammaReadParam<LittleEndian> for Bwhere
B: BitRead<LittleEndian>,
fn read_gamma_param<const USE_TABLE: bool>( &mut self ) -> Result<u64, <B as BitRead<LittleEndian>>::Error>
source§impl<B> GammaWriteParam<LittleEndian> for Bwhere
B: BitWrite<LittleEndian>,
impl<B> GammaWriteParam<LittleEndian> for Bwhere
B: BitWrite<LittleEndian>,
fn write_gamma_param<const USE_TABLE: bool>( &mut self, n: u64 ) -> Result<usize, <B as BitWrite<LittleEndian>>::Error>
source§impl<T> UpcastableFrom<T> for T
impl<T> UpcastableFrom<T> for T
source§fn upcast_from(value: T) -> T
fn upcast_from(value: T) -> T
Extend the current UnsignedInt to a possibly bigger size.