bitstream_io

Struct LittleEndian

Source
pub struct LittleEndian;
Expand description

Little-endian, or least significant bits first

Trait Implementations§

Source§

impl Clone for LittleEndian

Source§

fn clone(&self) -> LittleEndian

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LittleEndian

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Endianness for LittleEndian

Source§

fn push<N>(queue: &mut BitQueue<Self, N>, bits: u32, value: N)
where N: Numeric,

Pushes the given bits and value onto an accumulator with the given bits and value.
Source§

fn push_fixed<const B: u32, N>(queue: &mut BitQueue<Self, N>, value: N)
where N: Numeric,

Pushes the given constant number of bits and value onto an accumulator with the given bits and value.
Source§

fn pop<N>(queue: &mut BitQueue<Self, N>, bits: u32) -> N
where N: Numeric,

Pops a value with the given number of bits from an accumulator with the given bits and value.
Source§

fn pop_fixed<const B: u32, N>(queue: &mut BitQueue<Self, N>) -> N
where N: Numeric,

Pops a value with the given number of constant bits from an accumulator with the given bits and value.
Source§

fn drop<N>(queue: &mut BitQueue<Self, N>, bits: u32)
where N: Numeric,

Drops the given number of bits from an accumulator with the given bits and value.
Source§

fn next_zeros<N>(queue: &BitQueue<Self, N>) -> u32
where N: Numeric,

Returns the next number of 0 bits from an accumulator with the given bits and value.
Source§

fn next_ones<N>(queue: &BitQueue<Self, N>) -> u32
where N: Numeric,

Returns the next number of 1 bits from an accumulator with the given bits and value.
Source§

fn read_signed<R, S>(r: &mut R, bits: u32) -> Result<S>
where R: BitRead, S: SignedNumeric,

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: SignedNumeric,

Reads signed value from reader in this endianness
Source§

fn write_signed<W, S>(w: &mut W, bits: u32, value: S) -> Result<()>
where W: BitWrite, S: SignedNumeric,

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: SignedNumeric,

Writes signed value to writer in this endianness
Source§

fn read_primitive<R, V>(r: &mut R) -> Result<V>
where R: BitRead, V: Primitive,

Reads convertable numeric value from reader in this endianness
Source§

fn write_primitive<W, V>(w: &mut W, value: V) -> Result<()>
where W: BitWrite, V: Primitive,

Writes convertable numeric value to writer in this endianness
Source§

fn read_numeric<R, V>(r: R) -> Result<V>
where R: Read, V: Primitive,

Reads entire numeric value from reader in this endianness
Source§

fn write_numeric<W, V>(w: W, value: V) -> Result<()>
where W: Write, V: Primitive,

Writes entire numeric value to writer in this endianness
Source§

impl Copy for LittleEndian

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.