[−][src]Enum byte::ctx::Endian
Endian of numbers.
Default to machine's native endian.
Example
use byte::*; let bytes: &[u8] = &[0x00, 0xff]; let num_be: u16 = bytes.read_with(&mut 0, BE).unwrap(); assert_eq!(num_be, 0x00ff); let num_le: u16 = bytes.read_with(&mut 0, LE).unwrap(); assert_eq!(num_le, 0xff00);
Variants
Little
Little Endian byte order context
Big
Big Endian byte order context
Trait Implementations
impl<'a> TryRead<'a, Endian> for u8
[src]
impl<'a> TryRead<'a, Endian> for u16
[src]
impl<'a> TryRead<'a, Endian> for u32
[src]
impl<'a> TryRead<'a, Endian> for u64
[src]
impl<'a> TryRead<'a, Endian> for i8
[src]
impl<'a> TryRead<'a, Endian> for i16
[src]
impl<'a> TryRead<'a, Endian> for i32
[src]
impl<'a> TryRead<'a, Endian> for i64
[src]
impl<'a> TryRead<'a, Endian> for usize
[src]
impl<'a> TryRead<'a, Endian> for isize
[src]
impl<'a> TryRead<'a, Endian> for f32
[src]
impl<'a> TryRead<'a, Endian> for f64
[src]
impl TryWrite<Endian> for u8
[src]
impl TryWrite<Endian> for u16
[src]
impl TryWrite<Endian> for u32
[src]
impl TryWrite<Endian> for u64
[src]
impl TryWrite<Endian> for i8
[src]
impl TryWrite<Endian> for i16
[src]
impl TryWrite<Endian> for i32
[src]
impl TryWrite<Endian> for i64
[src]
impl TryWrite<Endian> for usize
[src]
impl TryWrite<Endian> for isize
[src]
impl<'a> TryWrite<Endian> for f32
[src]
impl<'a> TryWrite<Endian> for f64
[src]
impl PartialEq<Endian> for Endian
[src]
fn eq(&self, other: &Endian) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=
.
impl Eq for Endian
[src]
impl Debug for Endian
[src]
impl Copy for Endian
[src]
impl Clone for Endian
[src]
fn clone(&self) -> Endian
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for Endian
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,