Enum Endian
Source pub enum Endian {
Little,
Big,
}
Expand description
Read a u8 from a byte slice.
§Panics
Panics if the slice is smaller than 1 bytes.
Read a u16 from a byte slice.
§Panics
Panics if the slice is smaller than 2 bytes.
Read a u32 from a byte slice.
§Panics
Panics if the slice is smaller than 4 bytes.
Read a u64 from a byte slice.
§Panics
Panics if the slice is smaller than 8 bytes.
Read a u128 from a byte slice.
§Panics
Panics if the slice is smaller than 16 bytes.
Read a i8 from a byte slice.
§Panics
Panics if the slice is smaller than 1 bytes.
Read a i16 from a byte slice.
§Panics
Panics if the slice is smaller than 2 bytes.
Read a i32 from a byte slice.
§Panics
Panics if the slice is smaller than 4 bytes.
Read a i64 from a byte slice.
§Panics
Panics if the slice is smaller than 8 bytes.
Read a i128 from a byte slice.
§Panics
Panics if the slice is smaller than 16 bytes.
Read a f32 from a byte slice.
§Panics
Panics if the slice is smaller than 4 bytes.
Read a f64 from a byte slice.
§Panics
Panics if the slice is smaller than 8 bytes.
Write a u8 into a mutable byte slice.
§Panics
Panics if the slice is smaller than 1 bytes.
Write a u16 into a mutable byte slice.
§Panics
Panics if the slice is smaller than 2 bytes.
Write a u32 into a mutable byte slice.
§Panics
Panics if the slice is smaller than 4 bytes.
Write a u64 into a mutable byte slice.
§Panics
Panics if the slice is smaller than 8 bytes.
Write a u128 into a mutable byte slice.
§Panics
Panics if the slice is smaller than 16 bytes.
Write a i8 into a mutable byte slice.
§Panics
Panics if the slice is smaller than 1 bytes.
Write a i16 into a mutable byte slice.
§Panics
Panics if the slice is smaller than 2 bytes.
Write a i32 into a mutable byte slice.
§Panics
Panics if the slice is smaller than 4 bytes.
Write a i64 into a mutable byte slice.
§Panics
Panics if the slice is smaller than 8 bytes.
Write a i128 into a mutable byte slice.
§Panics
Panics if the slice is smaller than 16 bytes.
Write a f32 into a mutable byte slice.
§Panics
Panics if the slice is smaller than 4 bytes.
Write a f64 into a mutable byte slice.
§Panics
Panics if the slice is smaller than 8 bytes.
Performs copy-assignment from
source.
Read more
Formats the value using the given formatter.
Read more
Tests for self and other values to be equal, and is used by ==.
Tests for !=. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from
self to
dest.
Read more
Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more
Uses borrowed data to replace owned data, usually by cloning.
Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.