[−][src]Trait bitstream_io::Endianness
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
pub fn push<N>(queue: &mut BitQueue<Self, N>, bits: u32, value: N) where
N: Numeric, [src]
N: Numeric,
Pushes the given bits and value onto an accumulator with the given bits and value.
pub fn pop<N>(queue: &mut BitQueue<Self, N>, bits: u32) -> N where
N: Numeric, [src]
N: Numeric,
Pops a value with the given number of bits from an accumulator with the given bits and value.
pub fn drop<N>(queue: &mut BitQueue<Self, N>, bits: u32) where
N: Numeric, [src]
N: Numeric,
Drops the given number of bits from an accumulator with the given bits and value.
pub fn next_zeros<N>(queue: &BitQueue<Self, N>) -> u32 where
N: Numeric, [src]
N: Numeric,
Returns the next number of 0 bits from an accumulator with the given bits and value.
pub fn next_ones<N>(queue: &BitQueue<Self, N>) -> u32 where
N: Numeric, [src]
N: Numeric,
Returns the next number of 1 bits from an accumulator with the given bits and value.
pub fn read_signed<R, S>(r: &mut R, bits: u32) -> Result<S> where
R: BitRead,
S: SignedNumeric, [src]
R: BitRead,
S: SignedNumeric,
Reads signed value from reader in this endianness
pub fn write_signed<W, S>(w: &mut W, bits: u32, value: S) -> Result<()> where
W: BitWrite,
S: SignedNumeric, [src]
W: BitWrite,
S: SignedNumeric,
Writes signed value to writer in this endianness
pub fn read_numeric<R, N>(r: R) -> Result<N> where
R: Read,
N: Numeric, [src]
R: Read,
N: Numeric,
Reads entire numeric value from reader in this endianness
pub fn write_numeric<W, N>(w: W, value: N) -> Result<()> where
W: Write,
N: Numeric, [src]
W: Write,
N: Numeric,
Writes entire numeric value from reader in this endianness
Implementors
impl Endianness for BigEndian[src]
pub fn push<N>(queue: &mut BitQueue<Self, N>, bits: u32, value: N) where
N: Numeric, [src]
N: Numeric,
pub fn pop<N>(queue: &mut BitQueue<Self, N>, bits: u32) -> N where
N: Numeric, [src]
N: Numeric,
pub fn drop<N>(queue: &mut BitQueue<Self, N>, bits: u32) where
N: Numeric, [src]
N: Numeric,
pub fn next_zeros<N>(queue: &BitQueue<Self, N>) -> u32 where
N: Numeric, [src]
N: Numeric,
pub fn next_ones<N>(queue: &BitQueue<Self, N>) -> u32 where
N: Numeric, [src]
N: Numeric,
pub fn read_signed<R, S>(r: &mut R, bits: u32) -> Result<S> where
R: BitRead,
S: SignedNumeric, [src]
R: BitRead,
S: SignedNumeric,
pub fn write_signed<W, S>(w: &mut W, bits: u32, value: S) -> Result<()> where
W: BitWrite,
S: SignedNumeric, [src]
W: BitWrite,
S: SignedNumeric,
pub fn read_numeric<R, N>(r: R) -> Result<N> where
R: Read,
N: Numeric, [src]
R: Read,
N: Numeric,
pub fn write_numeric<W, N>(w: W, value: N) -> Result<()> where
W: Write,
N: Numeric, [src]
W: Write,
N: Numeric,
impl Endianness for LittleEndian[src]
pub fn push<N>(queue: &mut BitQueue<Self, N>, bits: u32, value: N) where
N: Numeric, [src]
N: Numeric,
pub fn pop<N>(queue: &mut BitQueue<Self, N>, bits: u32) -> N where
N: Numeric, [src]
N: Numeric,
pub fn drop<N>(queue: &mut BitQueue<Self, N>, bits: u32) where
N: Numeric, [src]
N: Numeric,
pub fn next_zeros<N>(queue: &BitQueue<Self, N>) -> u32 where
N: Numeric, [src]
N: Numeric,
pub fn next_ones<N>(queue: &BitQueue<Self, N>) -> u32 where
N: Numeric, [src]
N: Numeric,
pub fn read_signed<R, S>(r: &mut R, bits: u32) -> Result<S> where
R: BitRead,
S: SignedNumeric, [src]
R: BitRead,
S: SignedNumeric,
pub fn write_signed<W, S>(w: &mut W, bits: u32, value: S) -> Result<()> where
W: BitWrite,
S: SignedNumeric, [src]
W: BitWrite,
S: SignedNumeric,
pub fn read_numeric<R, N>(r: R) -> Result<N> where
R: Read,
N: Numeric, [src]
R: Read,
N: Numeric,
pub fn write_numeric<W, N>(w: W, value: N) -> Result<()> where
W: Write,
N: Numeric, [src]
W: Write,
N: Numeric,