pub struct BigEndian;Expand description
Big-endian, or most significant bits first
Trait Implementations§
Source§impl Endianness for BigEndian
impl Endianness for BigEndian
Source§fn write_bits<const MAX: u32, W, U>(
writer: &mut W,
queue_value: &mut u8,
queue_bits: &mut u32,
count: BitCount<MAX>,
value: U,
) -> Result<()>where
W: Write,
U: UnsignedInteger,
fn write_bits<const MAX: u32, W, U>(
writer: &mut W,
queue_value: &mut u8,
queue_bits: &mut u32,
count: BitCount<MAX>,
value: U,
) -> Result<()>where
W: Write,
U: UnsignedInteger,
For performing bulk writes of a type to a bit sink.
Source§fn write_bits_const<const BITS: u32, const VALUE: u32, W>(
writer: &mut W,
queue_value: &mut u8,
queue_bits: &mut u32,
) -> Result<()>where
W: Write,
fn write_bits_const<const BITS: u32, const VALUE: u32, W>(
writer: &mut W,
queue_value: &mut u8,
queue_bits: &mut u32,
) -> Result<()>where
W: Write,
For performing bulk writes of a constant value to a bit sink.
Source§fn write_bits_fixed<const BITS: u32, W, U>(
writer: &mut W,
queue_value: &mut u8,
queue_bits: &mut u32,
value: U,
) -> Result<()>where
W: Write,
U: UnsignedInteger,
fn write_bits_fixed<const BITS: u32, W, U>(
writer: &mut W,
queue_value: &mut u8,
queue_bits: &mut u32,
value: U,
) -> Result<()>where
W: Write,
U: UnsignedInteger,
For performing bulk writes of a type to a bit sink.
Source§fn push_bit_flush(
queue_value: &mut u8,
queue_bits: &mut u32,
bit: bool,
) -> Option<u8>
fn push_bit_flush( queue_value: &mut u8, queue_bits: &mut u32, bit: bool, ) -> Option<u8>
Pushes the next bit into the queue,
and returns
Some value if the queue is full.Source§fn read_bits<const MAX: u32, R, U>(
reader: &mut R,
queue_value: &mut u8,
queue_bits: &mut u32,
count: BitCount<MAX>,
) -> Result<U>where
R: Read,
U: UnsignedInteger,
fn read_bits<const MAX: u32, R, U>(
reader: &mut R,
queue_value: &mut u8,
queue_bits: &mut u32,
count: BitCount<MAX>,
) -> Result<U>where
R: Read,
U: UnsignedInteger,
For performing bulk reads from a bit source to an output type.
Source§fn read_bits_fixed<const BITS: u32, R, U>(
reader: &mut R,
queue_value: &mut u8,
queue_bits: &mut u32,
) -> Result<U>where
R: Read,
U: UnsignedInteger,
fn read_bits_fixed<const BITS: u32, R, U>(
reader: &mut R,
queue_value: &mut u8,
queue_bits: &mut u32,
) -> Result<U>where
R: Read,
U: UnsignedInteger,
For performing bulk reads from a bit source to an output type.
Source§fn pop_bit_refill<R>(
reader: &mut R,
queue_value: &mut u8,
queue_bits: &mut u32,
) -> Result<bool>where
R: Read,
fn pop_bit_refill<R>(
reader: &mut R,
queue_value: &mut u8,
queue_bits: &mut u32,
) -> Result<bool>where
R: Read,
Pops the next bit from the queue,
repleneshing it from the given reader if necessary
Source§fn pop_unary<const STOP_BIT: u8, R>(
reader: &mut R,
queue_value: &mut u8,
queue_bits: &mut u32,
) -> Result<u32>where
R: Read,
fn pop_unary<const STOP_BIT: u8, R>(
reader: &mut R,
queue_value: &mut u8,
queue_bits: &mut u32,
) -> Result<u32>where
R: Read,
Pops the next unary value from the source until
STOP_BIT is encountered, replenishing it from the given
closure if necessary. Read moreSource§fn read_signed<const MAX: u32, R, S>(
r: &mut R,
count: BitCount<MAX>,
) -> Result<S>where
R: BitRead,
S: SignedInteger,
fn read_signed<const MAX: u32, R, S>(
r: &mut R,
count: BitCount<MAX>,
) -> Result<S>where
R: BitRead,
S: SignedInteger,
Reads signed value from reader in this endianness
Source§fn read_signed_fixed<R, const B: u32, S>(r: &mut R) -> Result<S>where
R: BitRead,
S: SignedInteger,
fn read_signed_fixed<R, const B: u32, S>(r: &mut R) -> Result<S>where
R: BitRead,
S: SignedInteger,
Reads signed value from reader in this endianness
Source§fn write_signed<const MAX: u32, W, S>(
w: &mut W,
count: BitCount<MAX>,
value: S,
) -> Result<()>where
W: BitWrite,
S: SignedInteger,
fn write_signed<const MAX: u32, W, S>(
w: &mut W,
count: BitCount<MAX>,
value: S,
) -> Result<()>where
W: BitWrite,
S: SignedInteger,
Writes signed value to writer in this endianness
Source§fn write_signed_fixed<W, const B: u32, S>(w: &mut W, value: S) -> Result<()>where
W: BitWrite,
S: SignedInteger,
fn write_signed_fixed<W, const B: u32, S>(w: &mut W, value: S) -> Result<()>where
W: BitWrite,
S: SignedInteger,
Writes signed value to writer in this endianness
Source§fn read_primitive<R, V>(r: &mut R) -> Result<V>
fn read_primitive<R, V>(r: &mut R) -> Result<V>
Reads convertable numeric value from reader in this endianness
Source§fn write_primitive<W, V>(w: &mut W, value: V) -> Result<()>
fn write_primitive<W, V>(w: &mut W, value: V) -> Result<()>
Writes convertable numeric value to writer in this endianness
Source§fn read_numeric<R, V>(r: R) -> Result<V>
fn read_numeric<R, V>(r: R) -> Result<V>
Reads entire numeric value from reader in this endianness
impl Copy for BigEndian
Auto Trait Implementations§
impl Freeze for BigEndian
impl RefUnwindSafe for BigEndian
impl Send for BigEndian
impl Sync for BigEndian
impl Unpin for BigEndian
impl UnwindSafe for BigEndian
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