Struct object::endian::BigEndian

source ·
pub struct BigEndian;
Expand description

Compile-time big endian byte order.

Trait Implementations§

source§

impl Clone for BigEndian

source§

fn clone(&self) -> BigEndian

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 BigEndian

source§

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

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

impl Default for BigEndian

source§

fn default() -> BigEndian

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

impl Endian for BigEndian

source§

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

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

fn is_big_endian(self) -> bool

Return true for big endian byte order.
source§

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

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

fn is_little_endian(self) -> bool

Return true for little endian byte order.
source§

fn read_u16(self, n: u16) -> u16

Converts an unsigned 16 bit integer to native endian.
source§

fn read_u32(self, n: u32) -> u32

Converts an unsigned 32 bit integer to native endian.
source§

fn read_u64(self, n: u64) -> u64

Converts an unsigned 64 bit integer to native endian.
source§

fn read_i16(self, n: i16) -> i16

Converts a signed 16 bit integer to native endian.
source§

fn read_i32(self, n: i32) -> i32

Converts a signed 32 bit integer to native endian.
source§

fn read_i64(self, n: i64) -> i64

Converts a signed 64 bit integer to native endian.
source§

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

Converts an unaligned unsigned 16 bit integer to native endian.
source§

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

Converts an unaligned unsigned 32 bit integer to native endian.
source§

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

Converts an unaligned unsigned 64 bit integer to native endian.
source§

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

Converts an unaligned signed 16 bit integer to native endian.
source§

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

Converts an unaligned signed 32 bit integer to native endian.
source§

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

Converts an unaligned signed 64 bit integer to native endian.
source§

fn write_u16(self, n: u16) -> u16

Converts an unsigned 16 bit integer from native endian.
source§

fn write_u32(self, n: u32) -> u32

Converts an unsigned 32 bit integer from native endian.
source§

fn write_u64(self, n: u64) -> u64

Converts an unsigned 64 bit integer from native endian.
source§

fn write_i16(self, n: i16) -> i16

Converts a signed 16 bit integer from native endian.
source§

fn write_i32(self, n: i32) -> i32

Converts a signed 32 bit integer from native endian.
source§

fn write_i64(self, n: i64) -> i64

Converts a signed 64 bit integer from native endian.
source§

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

Converts an unaligned unsigned 16 bit integer from native endian.
source§

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

Converts an unaligned unsigned 32 bit integer from native endian.
source§

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

Converts an unaligned unsigned 64 bit integer from native endian.
source§

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

Converts an unaligned signed 16 bit integer from native endian.
source§

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

Converts an unaligned signed 32 bit integer from native endian.
source§

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

Converts an unaligned signed 64 bit integer from native endian.
source§

impl Hash for BigEndian

source§

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

Feeds this value into the given Hasher. Read more
1.3.0 · source§

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

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

impl PartialEq for BigEndian

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for BigEndian

source§

impl Eq for BigEndian

source§

impl StructuralEq for BigEndian

source§

impl StructuralPartialEq for BigEndian

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.