Enum byte::ctx::Endian
[−]
[src]
pub enum Endian { Little, Big, }
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 Debug for Endian
[src]
impl PartialEq for Endian
[src]
fn eq(&self, __arg_0: &Endian) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl Eq for Endian
[src]
impl Copy for Endian
[src]
impl Clone for Endian
[src]
fn clone(&self) -> Endian
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more