Trait Endianness
trait Endianness: Sized
A stream's endianness, or byte order, for determining how bits should be read.
It comes in BigEndian and LittleEndian varieties
(which may be shortened to BE and LE)
and is not something programmers should have to implement
in most cases.
Required Methods
fn push<N>(queue: &mut BitQueue<Self, N>, bits: u32, value: N) where N: NumericPushes the given bits and value onto an accumulator with the given bits and value.
fn push_fixed<B: u32, N>(queue: &mut BitQueue<Self, N>, value: N) where N: NumericPushes the given constant number of bits and value onto an accumulator with the given bits and value.
fn pop<N>(queue: &mut BitQueue<Self, N>, bits: u32) -> N where N: NumericPops a value with the given number of bits from an accumulator with the given bits and value.
fn pop_fixed<B: u32, N>(queue: &mut BitQueue<Self, N>) -> N where N: NumericPops a value with the given number of constant bits from an accumulator with the given bits and value.
fn drop<N>(queue: &mut BitQueue<Self, N>, bits: u32) where N: NumericDrops the given number of bits from an accumulator with the given bits and value.
fn next_zeros<N>(queue: &BitQueue<Self, N>) -> u32 where N: NumericReturns the next number of 0 bits from an accumulator with the given bits and value.
fn next_ones<N>(queue: &BitQueue<Self, N>) -> u32 where N: NumericReturns the next number of 1 bits from an accumulator with the given bits and value.
fn read_signed<R, S>(r: &mut R, bits: u32) -> Result<S> where R: BitRead, S: SignedNumericReads signed value from reader in this endianness
fn read_signed_fixed<R, B: u32, S>(r: &mut R) -> Result<S> where R: BitRead, S: SignedNumericReads signed value from reader in this endianness
fn write_signed<W, S>(w: &mut W, bits: u32, value: S) -> Result<()> where W: BitWrite, S: SignedNumericWrites signed value to writer in this endianness
fn write_signed_fixed<W, B: u32, S>(w: &mut W, value: S) -> Result<()> where W: BitWrite, S: SignedNumericWrites signed value to writer in this endianness
fn read_primitive<R, V>(r: &mut R) -> Result<V> where R: BitRead, V: PrimitiveReads convertable numeric value from reader in this endianness
fn write_primitive<W, V>(w: &mut W, value: V) -> Result<()> where W: BitWrite, V: PrimitiveWrites convertable numeric value to writer in this endianness
fn read_numeric<R, V>(r: R) -> Result<V> where R: Read, V: PrimitiveReads entire numeric value from reader in this endianness
fn write_numeric<W, V>(w: W, value: V) -> Result<()> where W: Write, V: PrimitiveWrites entire numeric value to writer in this endianness
Implementors
impl Endianness for BigEndianimpl Endianness for LittleEndian