Skip to main content

LittleEndian

Struct LittleEndian 

Source
pub struct LittleEndian;
Expand description

Little-endian ByteOrder marker.

Trait Implementations§

Source§

impl ByteOrder for LittleEndian

Source§

const ENDIAN: Endian = Endian::Little

Source§

impl Clone for LittleEndian

Source§

fn clone(&self) -> LittleEndian

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for LittleEndian

Source§

impl Debug for LittleEndian

Source§

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

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

impl Eq for LittleEndian

Source§

impl IntEncoding<LittleEndian> for FixInt

Source§

const STATIC: bool = true

Whether the encoded length for all integer types T is constant and equal to size_of::<T>(). Read more
Source§

const ZERO_COPY: bool = true

Whether the encoding format for integer types T matches their in-memory representation. Read more
Source§

fn encode_u16(val: u16, writer: impl Writer) -> WriteResult<()>

Encode the given u16 value and write it to the writer.
Source§

fn decode_u16<'de>(reader: impl Reader<'de>) -> ReadResult<u16>

Decode a u16 value from the reader.
Source§

fn size_of_u16(_val: u16) -> usize

Get the encoded size of the given u16 value. Read more
Source§

fn encode_u32(val: u32, writer: impl Writer) -> WriteResult<()>

Encode a u32 value and write it to the writer.
Source§

fn decode_u32<'de>(reader: impl Reader<'de>) -> ReadResult<u32>

Decode a u32 value from the reader.
Source§

fn size_of_u32(_val: u32) -> usize

Get the encoded size of the given u32 value. Read more
Source§

fn encode_u64(val: u64, writer: impl Writer) -> WriteResult<()>

Encode a u64 value and write it to the writer.
Source§

fn decode_u64<'de>(reader: impl Reader<'de>) -> ReadResult<u64>

Decode a u64 value from the reader.
Source§

fn size_of_u64(_val: u64) -> usize

Get the encoded size of the given u64 value. Read more
Source§

fn encode_u128(val: u128, writer: impl Writer) -> WriteResult<()>

Encode a u128 value and write it to the writer.
Source§

fn decode_u128<'de>(reader: impl Reader<'de>) -> ReadResult<u128>

Decode a u128 value from the reader.
Source§

fn size_of_u128(_val: u128) -> usize

Get the encoded size of the given u128 value. Read more
Source§

fn encode_i16(val: i16, writer: impl Writer) -> WriteResult<()>

Encode a i16 value and write it to the writer.
Source§

fn decode_i16<'de>(reader: impl Reader<'de>) -> ReadResult<i16>

Decode a i16 value from the reader.
Source§

fn size_of_i16(_val: i16) -> usize

Get the encoded size of the given i16 value. Read more
Source§

fn encode_i32(val: i32, writer: impl Writer) -> WriteResult<()>

Encode a i32 value and write it to the writer.
Source§

fn decode_i32<'de>(reader: impl Reader<'de>) -> ReadResult<i32>

Decode a i32 value from the reader.
Source§

fn size_of_i32(_val: i32) -> usize

Get the encoded size of the given i32 value. Read more
Source§

fn encode_i64(val: i64, writer: impl Writer) -> WriteResult<()>

Encode a i64 value and write it to the writer.
Source§

fn decode_i64<'de>(reader: impl Reader<'de>) -> ReadResult<i64>

Decode a i64 value from the reader.
Source§

fn size_of_i64(_val: i64) -> usize

Get the encoded size of the given i64 value. Read more
Source§

fn encode_i128(val: i128, writer: impl Writer) -> WriteResult<()>

Encode a i128 value and write it to the writer.
Source§

fn decode_i128<'de>(reader: impl Reader<'de>) -> ReadResult<i128>

Decode a i128 value from the reader.
Source§

fn size_of_i128(_val: i128) -> usize

Get the encoded size of the given i128 value. Read more
Source§

impl PartialEq for LittleEndian

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PlatformEndian for LittleEndian

Available on little-endian only.
Source§

impl StructuralPartialEq 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, dest: *mut u8)

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

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

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

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

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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.