Enum deku::ctx::Endian[][src]

pub enum Endian {
    Little,
    Big,
}

An endian

Variants

Little

Little endian

Big

Big endian

Implementations

impl Endian[src]

pub const fn new() -> Self[src]

Endian::default, but const.

pub fn is_le(self) -> bool[src]

Is it little endian

pub fn is_be(self) -> bool[src]

Is it big endian

Trait Implementations

impl Clone for Endian[src]

impl Copy for Endian[src]

impl Debug for Endian[src]

impl Default for Endian[src]

fn default() -> Self[src]

Return the endianness of the target’s CPU.

impl DekuRead<'_, Endian> for NonZeroU8[src]

impl DekuRead<'_, Endian> for NonZeroU16[src]

impl DekuRead<'_, Endian> for NonZeroI128[src]

impl DekuRead<'_, Endian> for NonZeroIsize[src]

impl DekuRead<'_, Endian> for u8[src]

impl DekuRead<'_, Endian> for u16[src]

impl DekuRead<'_, Endian> for u32[src]

impl DekuRead<'_, Endian> for u64[src]

impl DekuRead<'_, Endian> for u128[src]

impl DekuRead<'_, Endian> for usize[src]

impl DekuRead<'_, Endian> for i8[src]

impl DekuRead<'_, Endian> for i16[src]

impl DekuRead<'_, Endian> for NonZeroU32[src]

impl DekuRead<'_, Endian> for i32[src]

impl DekuRead<'_, Endian> for i64[src]

impl DekuRead<'_, Endian> for i128[src]

impl DekuRead<'_, Endian> for isize[src]

impl DekuRead<'_, Endian> for f32[src]

impl DekuRead<'_, Endian> for f64[src]

impl DekuRead<'_, Endian> for NonZeroU64[src]

impl DekuRead<'_, Endian> for NonZeroU128[src]

impl DekuRead<'_, Endian> for NonZeroUsize[src]

impl DekuRead<'_, Endian> for NonZeroI8[src]

impl DekuRead<'_, Endian> for NonZeroI16[src]

impl DekuRead<'_, Endian> for NonZeroI32[src]

impl DekuRead<'_, Endian> for NonZeroI64[src]

impl DekuWrite<Endian> for NonZeroU8[src]

impl DekuWrite<Endian> for NonZeroU16[src]

impl DekuWrite<Endian> for NonZeroI128[src]

impl DekuWrite<Endian> for NonZeroIsize[src]

impl DekuWrite<Endian> for u8[src]

impl DekuWrite<Endian> for u16[src]

impl DekuWrite<Endian> for u32[src]

impl DekuWrite<Endian> for u64[src]

impl DekuWrite<Endian> for u128[src]

impl DekuWrite<Endian> for usize[src]

impl DekuWrite<Endian> for i8[src]

impl DekuWrite<Endian> for i16[src]

impl DekuWrite<Endian> for NonZeroU32[src]

impl DekuWrite<Endian> for i32[src]

impl DekuWrite<Endian> for i64[src]

impl DekuWrite<Endian> for i128[src]

impl DekuWrite<Endian> for isize[src]

impl DekuWrite<Endian> for f32[src]

impl DekuWrite<Endian> for f64[src]

impl DekuWrite<Endian> for NonZeroU64[src]

impl DekuWrite<Endian> for NonZeroU128[src]

impl DekuWrite<Endian> for NonZeroUsize[src]

impl DekuWrite<Endian> for NonZeroI8[src]

impl DekuWrite<Endian> for NonZeroI16[src]

impl DekuWrite<Endian> for NonZeroI32[src]

impl DekuWrite<Endian> for NonZeroI64[src]

impl Eq for Endian[src]

impl FromStr for Endian[src]

type Err = ParseEndianError

The associated error which can be returned from parsing.

fn from_str(s: &str) -> Result<Self, Self::Err>[src]

Parse a Endian from a string.

Examples

use std::str::FromStr;
use deku::ctx::Endian;
assert_eq!(FromStr::from_str("little"), Ok(Endian::Little));
assert_eq!(FromStr::from_str("big"), Ok(Endian::Big));
assert!(<Endian as FromStr>::from_str("not an endian").is_err());

impl PartialEq<Endian> for Endian[src]

impl StructuralEq for Endian[src]

impl StructuralPartialEq for Endian[src]

Auto Trait Implementations

impl RefUnwindSafe for Endian

impl Send for Endian

impl Sync for Endian

impl Unpin for Endian

impl UnwindSafe for Endian

Blanket Implementations

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

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

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

impl<T> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

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

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

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.