[][src]Enum byteorder::LittleEndian

pub enum LittleEndian {}
[]

Defines little-endian serialization.

Note that this type has no value constructor. It is used purely at the type level.

Examples

Write and read u32 numbers in little endian order:

use byteorder::{ByteOrder, LittleEndian};

let mut buf = [0; 4];
LittleEndian::write_u32(&mut buf, 1_000_000);
assert_eq!(1_000_000, LittleEndian::read_u32(&buf));

Trait Implementations

impl ByteOrder for LittleEndian[src][+]

Reads an unsigned 24 bit integer from buf, stored in u32. Read more

Reads an unsigned 48 bit integer from buf, stored in u64. Read more

Writes an unsigned 24 bit integer n to buf, stored in u32. Read more

Writes an unsigned 48 bit integer n to buf, stored in u64. Read more

Reads a signed 16 bit integer from buf. Read more

Reads a signed 24 bit integer from buf, stored in i32. Read more

Reads a signed 32 bit integer from buf. Read more

Reads a signed 48 bit integer from buf, stored in i64. Read more

Reads a signed 64 bit integer from buf. Read more

Reads a signed 128 bit integer from buf. Read more

Reads a signed n-bytes integer from buf. Read more

Reads a signed n-bytes integer from buf. Read more

Reads a IEEE754 single-precision (4 bytes) floating point number. Read more

Reads a IEEE754 double-precision (8 bytes) floating point number. Read more

Writes a signed 16 bit integer n to buf. Read more

Writes a signed 24 bit integer n to buf, stored in i32. Read more

Writes a signed 32 bit integer n to buf. Read more

Writes a signed 48 bit integer n to buf, stored in i64. Read more

Writes a signed 64 bit integer n to buf. Read more

Writes a signed 128 bit integer n to buf. Read more

Writes a signed integer n to buf using only nbytes. Read more

Writes a signed integer n to buf using only nbytes. Read more

Writes a IEEE754 single-precision (4 bytes) floating point number. Read more

Writes a IEEE754 double-precision (8 bytes) floating point number. Read more

Reads signed 16 bit integers from src to dst. Read more

Reads signed 32 bit integers from src into dst. Read more

Reads signed 64 bit integers from src into dst. Read more

Reads signed 128 bit integers from src into dst. Read more

Reads IEEE754 single-precision (4 bytes) floating point numbers from src into dst. Read more

Deprecated since 1.3.0:

please use read_f32_into instead

DEPRECATED. Read more

Reads IEEE754 single-precision (4 bytes) floating point numbers from src into dst. Read more

Deprecated since 1.3.0:

please use read_f64_into instead

DEPRECATED. Read more

Writes signed 16 bit integers from src into dst. Read more

Writes signed 32 bit integers from src into dst. Read more

Writes signed 64 bit integers from src into dst. Read more

Writes signed 128 bit integers from src into dst. Read more

Writes IEEE754 single-precision (4 bytes) floating point numbers from src into dst. Read more

Writes IEEE754 double-precision (8 bytes) floating point numbers from src into dst. Read more

Converts the given slice of signed 16 bit integers to a particular endianness. Read more

Converts the given slice of signed 32 bit integers to a particular endianness. Read more

Converts the given slice of signed 64 bit integers to a particular endianness. Read more

Converts the given slice of signed 128 bit integers to a particular endianness. Read more

impl PartialEq<LittleEndian> for LittleEndian[src][+]

This method tests for !=.

impl Clone for LittleEndian[src][+]

Performs copy-assignment from source. Read more

impl Ord for LittleEndian[src][+]

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

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

Restrict a value to a certain interval. Read more

impl Eq for LittleEndian[src]

impl PartialOrd<LittleEndian> for LittleEndian[src][+]

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Copy for LittleEndian[src]

impl Default for LittleEndian[src][+]

impl Debug for LittleEndian[src][+]

impl Hash for LittleEndian[src][+]

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

Auto Trait Implementations

impl Send for LittleEndian

impl Sync for LittleEndian

Blanket Implementations

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

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

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

type Owned = T

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.