Struct object::endian::LittleEndian[][src]

pub struct LittleEndian;
Expand description

Compile-time little endian byte order.

Trait Implementations

impl Clone for LittleEndian[src]

fn clone(&self) -> LittleEndian[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for LittleEndian[src]

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

Formats the value using the given formatter. Read more

impl Default for LittleEndian[src]

fn default() -> LittleEndian[src]

Returns the “default value” for a type. Read more

impl Endian for LittleEndian[src]

fn from_big_endian(big_endian: bool) -> Option<Self>[src]

Construct a specification for the endianness of some values. Read more

fn is_big_endian(self) -> bool[src]

Return true for big endian byte order.

fn from_little_endian(little_endian: bool) -> Option<Self>[src]

Construct a specification for the endianness of some values. Read more

fn is_little_endian(self) -> bool[src]

Return true for little endian byte order.

fn read_u16(self, n: u16) -> u16[src]

Converts an unsigned 16 bit integer to native endian.

fn read_u32(self, n: u32) -> u32[src]

Converts an unsigned 32 bit integer to native endian.

fn read_u64(self, n: u64) -> u64[src]

Converts an unsigned 64 bit integer to native endian.

fn read_i16(self, n: i16) -> i16[src]

Converts a signed 16 bit integer to native endian.

fn read_i32(self, n: i32) -> i32[src]

Converts a signed 32 bit integer to native endian.

fn read_i64(self, n: i64) -> i64[src]

Converts a signed 64 bit integer to native endian.

fn read_u16_bytes(self, n: [u8; 2]) -> u16[src]

Converts an unaligned unsigned 16 bit integer to native endian.

fn read_u32_bytes(self, n: [u8; 4]) -> u32[src]

Converts an unaligned unsigned 32 bit integer to native endian.

fn read_u64_bytes(self, n: [u8; 8]) -> u64[src]

Converts an unaligned unsigned 64 bit integer to native endian.

fn read_i16_bytes(self, n: [u8; 2]) -> i16[src]

Converts an unaligned signed 16 bit integer to native endian.

fn read_i32_bytes(self, n: [u8; 4]) -> i32[src]

Converts an unaligned signed 32 bit integer to native endian.

fn read_i64_bytes(self, n: [u8; 8]) -> i64[src]

Converts an unaligned signed 64 bit integer to native endian.

fn write_u16(self, n: u16) -> u16[src]

Converts an unsigned 16 bit integer from native endian.

fn write_u32(self, n: u32) -> u32[src]

Converts an unsigned 32 bit integer from native endian.

fn write_u64(self, n: u64) -> u64[src]

Converts an unsigned 64 bit integer from native endian.

fn write_i16(self, n: i16) -> i16[src]

Converts a signed 16 bit integer from native endian.

fn write_i32(self, n: i32) -> i32[src]

Converts a signed 32 bit integer from native endian.

fn write_i64(self, n: i64) -> i64[src]

Converts a signed 64 bit integer from native endian.

fn write_u16_bytes(self, n: u16) -> [u8; 2][src]

Converts an unaligned unsigned 16 bit integer from native endian.

fn write_u32_bytes(self, n: u32) -> [u8; 4][src]

Converts an unaligned unsigned 32 bit integer from native endian.

fn write_u64_bytes(self, n: u64) -> [u8; 8][src]

Converts an unaligned unsigned 64 bit integer from native endian.

fn write_i16_bytes(self, n: i16) -> [u8; 2][src]

Converts an unaligned signed 16 bit integer from native endian.

fn write_i32_bytes(self, n: i32) -> [u8; 4][src]

Converts an unaligned signed 32 bit integer from native endian.

fn write_i64_bytes(self, n: i64) -> [u8; 8][src]

Converts an unaligned signed 64 bit integer from native endian.

impl Hash for LittleEndian[src]

fn hash<__H: Hasher>(&self, state: &mut __H)[src]

Feeds this value into the given Hasher. Read more

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given Hasher. Read more

impl PartialEq<LittleEndian> for LittleEndian[src]

fn eq(&self, other: &LittleEndian) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl Copy for LittleEndian[src]

impl Eq for LittleEndian[src]

impl StructuralEq for LittleEndian[src]

impl StructuralPartialEq for LittleEndian[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

pub fn equivalent(&self, key: &K) -> bool[src]

Compare self to key and return true if they are equal.

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.