Struct bitstream_io::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 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 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 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 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> 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,

§

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

§

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

§

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.