Enum scroll::Endian

source ·
pub enum Endian {
    Little,
    Big,
}
Expand description

The endianness (byte order) of a stream of bytes

Variants§

§

Little

§

Big

Implementations§

source§

impl Endian

source

pub fn network() -> Endian

source

pub fn is_little(&self) -> bool

Trait Implementations§

source§

impl Clone for Endian

source§

fn clone(&self) -> Endian

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 Endian

source§

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

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

impl Default for Endian

source§

fn default() -> Self

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

impl From<bool> for Endian

source§

fn from(little_endian: bool) -> Self

Converts to this type from the input type.
source§

impl<'a> FromCtx<Endian> for f32

source§

fn from_ctx(src: &[u8], le: Endian) -> Self

source§

impl<'a> FromCtx<Endian> for f64

source§

fn from_ctx(src: &[u8], le: Endian) -> Self

source§

impl<'a> FromCtx<Endian> for i128

source§

fn from_ctx(src: &[u8], le: Endian) -> Self

source§

impl<'a> FromCtx<Endian> for i16

source§

fn from_ctx(src: &[u8], le: Endian) -> Self

source§

impl<'a> FromCtx<Endian> for i32

source§

fn from_ctx(src: &[u8], le: Endian) -> Self

source§

impl<'a> FromCtx<Endian> for i64

source§

fn from_ctx(src: &[u8], le: Endian) -> Self

source§

impl<'a> FromCtx<Endian> for i8

source§

fn from_ctx(src: &[u8], le: Endian) -> Self

source§

impl<'a> FromCtx<Endian> for u128

source§

fn from_ctx(src: &[u8], le: Endian) -> Self

source§

impl<'a> FromCtx<Endian> for u16

source§

fn from_ctx(src: &[u8], le: Endian) -> Self

source§

impl<'a> FromCtx<Endian> for u32

source§

fn from_ctx(src: &[u8], le: Endian) -> Self

source§

impl<'a> FromCtx<Endian> for u64

source§

fn from_ctx(src: &[u8], le: Endian) -> Self

source§

impl<'a> FromCtx<Endian> for u8

source§

fn from_ctx(src: &[u8], le: Endian) -> Self

source§

impl<'a, T> FromCtx<Endian, T> for i128
where T: AsRef<[u8]>,

source§

fn from_ctx(src: &T, le: Endian) -> Self

source§

impl<'a, T> FromCtx<Endian, T> for i16
where T: AsRef<[u8]>,

source§

fn from_ctx(src: &T, le: Endian) -> Self

source§

impl<'a, T> FromCtx<Endian, T> for i32
where T: AsRef<[u8]>,

source§

fn from_ctx(src: &T, le: Endian) -> Self

source§

impl<'a, T> FromCtx<Endian, T> for i64
where T: AsRef<[u8]>,

source§

fn from_ctx(src: &T, le: Endian) -> Self

source§

impl<'a, T> FromCtx<Endian, T> for i8
where T: AsRef<[u8]>,

source§

fn from_ctx(src: &T, le: Endian) -> Self

source§

impl<'a, T> FromCtx<Endian, T> for u128
where T: AsRef<[u8]>,

source§

fn from_ctx(src: &T, le: Endian) -> Self

source§

impl<'a, T> FromCtx<Endian, T> for u16
where T: AsRef<[u8]>,

source§

fn from_ctx(src: &T, le: Endian) -> Self

source§

impl<'a, T> FromCtx<Endian, T> for u32
where T: AsRef<[u8]>,

source§

fn from_ctx(src: &T, le: Endian) -> Self

source§

impl<'a, T> FromCtx<Endian, T> for u64
where T: AsRef<[u8]>,

source§

fn from_ctx(src: &T, le: Endian) -> Self

source§

impl<'a, T> FromCtx<Endian, T> for u8
where T: AsRef<[u8]>,

source§

fn from_ctx(src: &T, le: Endian) -> Self

source§

impl<'a> IntoCtx<Endian> for &'a f32

source§

fn into_ctx(self, dst: &mut [u8], le: Endian)

source§

impl<'a> IntoCtx<Endian> for &'a f64

source§

fn into_ctx(self, dst: &mut [u8], le: Endian)

source§

impl<'a> IntoCtx<Endian> for &'a i128

source§

fn into_ctx(self, dst: &mut [u8], le: Endian)

source§

impl<'a> IntoCtx<Endian> for &'a i16

source§

fn into_ctx(self, dst: &mut [u8], le: Endian)

source§

impl<'a> IntoCtx<Endian> for &'a i32

source§

fn into_ctx(self, dst: &mut [u8], le: Endian)

source§

impl<'a> IntoCtx<Endian> for &'a i64

source§

fn into_ctx(self, dst: &mut [u8], le: Endian)

source§

impl<'a> IntoCtx<Endian> for &'a i8

source§

fn into_ctx(self, dst: &mut [u8], le: Endian)

source§

impl<'a> IntoCtx<Endian> for &'a u128

source§

fn into_ctx(self, dst: &mut [u8], le: Endian)

source§

impl<'a> IntoCtx<Endian> for &'a u16

source§

fn into_ctx(self, dst: &mut [u8], le: Endian)

source§

impl<'a> IntoCtx<Endian> for &'a u32

source§

fn into_ctx(self, dst: &mut [u8], le: Endian)

source§

impl<'a> IntoCtx<Endian> for &'a u64

source§

fn into_ctx(self, dst: &mut [u8], le: Endian)

source§

impl<'a> IntoCtx<Endian> for &'a u8

source§

fn into_ctx(self, dst: &mut [u8], le: Endian)

source§

impl IntoCtx<Endian> for f32

source§

fn into_ctx(self, dst: &mut [u8], le: Endian)

source§

impl IntoCtx<Endian> for f64

source§

fn into_ctx(self, dst: &mut [u8], le: Endian)

source§

impl IntoCtx<Endian> for i128

source§

fn into_ctx(self, dst: &mut [u8], le: Endian)

source§

impl IntoCtx<Endian> for i16

source§

fn into_ctx(self, dst: &mut [u8], le: Endian)

source§

impl IntoCtx<Endian> for i32

source§

fn into_ctx(self, dst: &mut [u8], le: Endian)

source§

impl IntoCtx<Endian> for i64

source§

fn into_ctx(self, dst: &mut [u8], le: Endian)

source§

impl IntoCtx<Endian> for i8

source§

fn into_ctx(self, dst: &mut [u8], le: Endian)

source§

impl IntoCtx<Endian> for u128

source§

fn into_ctx(self, dst: &mut [u8], le: Endian)

source§

impl IntoCtx<Endian> for u16

source§

fn into_ctx(self, dst: &mut [u8], le: Endian)

source§

impl IntoCtx<Endian> for u32

source§

fn into_ctx(self, dst: &mut [u8], le: Endian)

source§

impl IntoCtx<Endian> for u64

source§

fn into_ctx(self, dst: &mut [u8], le: Endian)

source§

impl IntoCtx<Endian> for u8

source§

fn into_ctx(self, dst: &mut [u8], le: Endian)

source§

impl PartialEq for Endian

source§

fn eq(&self, other: &Endian) -> 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 SizeWith<Endian> for f32

source§

impl SizeWith<Endian> for f64

source§

impl SizeWith<Endian> for i128

source§

impl SizeWith<Endian> for i16

source§

impl SizeWith<Endian> for i32

source§

impl SizeWith<Endian> for i64

source§

impl SizeWith<Endian> for i8

source§

impl SizeWith<Endian> for u128

source§

impl SizeWith<Endian> for u16

source§

impl SizeWith<Endian> for u32

source§

impl SizeWith<Endian> for u64

source§

impl SizeWith<Endian> for u8

source§

impl<'a> TryFromCtx<'a, Endian> for f32
where f32: FromCtx<Endian>,

§

type Error = Error

source§

fn try_from_ctx(src: &'a [u8], le: Endian) -> Result<(Self, usize), Self::Error>

source§

impl<'a> TryFromCtx<'a, Endian> for f64
where f64: FromCtx<Endian>,

§

type Error = Error

source§

fn try_from_ctx(src: &'a [u8], le: Endian) -> Result<(Self, usize), Self::Error>

source§

impl<'a> TryFromCtx<'a, Endian> for i128

§

type Error = Error

source§

fn try_from_ctx(src: &'a [u8], le: Endian) -> Result<(Self, usize), Self::Error>

source§

impl<'a> TryFromCtx<'a, Endian> for i16
where i16: FromCtx<Endian>,

§

type Error = Error

source§

fn try_from_ctx(src: &'a [u8], le: Endian) -> Result<(Self, usize), Self::Error>

source§

impl<'a> TryFromCtx<'a, Endian> for i32
where i32: FromCtx<Endian>,

§

type Error = Error

source§

fn try_from_ctx(src: &'a [u8], le: Endian) -> Result<(Self, usize), Self::Error>

source§

impl<'a> TryFromCtx<'a, Endian> for i64
where i64: FromCtx<Endian>,

§

type Error = Error

source§

fn try_from_ctx(src: &'a [u8], le: Endian) -> Result<(Self, usize), Self::Error>

source§

impl<'a> TryFromCtx<'a, Endian> for i8
where i8: FromCtx<Endian>,

§

type Error = Error

source§

fn try_from_ctx(src: &'a [u8], le: Endian) -> Result<(Self, usize), Self::Error>

source§

impl<'a> TryFromCtx<'a, Endian> for u128

§

type Error = Error

source§

fn try_from_ctx(src: &'a [u8], le: Endian) -> Result<(Self, usize), Self::Error>

source§

impl<'a> TryFromCtx<'a, Endian> for u16
where u16: FromCtx<Endian>,

§

type Error = Error

source§

fn try_from_ctx(src: &'a [u8], le: Endian) -> Result<(Self, usize), Self::Error>

source§

impl<'a> TryFromCtx<'a, Endian> for u32
where u32: FromCtx<Endian>,

§

type Error = Error

source§

fn try_from_ctx(src: &'a [u8], le: Endian) -> Result<(Self, usize), Self::Error>

source§

impl<'a> TryFromCtx<'a, Endian> for u64
where u64: FromCtx<Endian>,

§

type Error = Error

source§

fn try_from_ctx(src: &'a [u8], le: Endian) -> Result<(Self, usize), Self::Error>

source§

impl<'a> TryFromCtx<'a, Endian> for u8
where u8: FromCtx<Endian>,

§

type Error = Error

source§

fn try_from_ctx(src: &'a [u8], le: Endian) -> Result<(Self, usize), Self::Error>

source§

impl<'a, T> TryFromCtx<'a, Endian, T> for i128
where i128: FromCtx<Endian, T>, T: AsRef<[u8]>,

§

type Error = Error

source§

fn try_from_ctx(src: &'a T, le: Endian) -> Result<(Self, usize), Self::Error>

source§

impl<'a, T> TryFromCtx<'a, Endian, T> for i16
where i16: FromCtx<Endian, T>, T: AsRef<[u8]>,

§

type Error = Error

source§

fn try_from_ctx(src: &'a T, le: Endian) -> Result<(Self, usize), Self::Error>

source§

impl<'a, T> TryFromCtx<'a, Endian, T> for i32
where i32: FromCtx<Endian, T>, T: AsRef<[u8]>,

§

type Error = Error

source§

fn try_from_ctx(src: &'a T, le: Endian) -> Result<(Self, usize), Self::Error>

source§

impl<'a, T> TryFromCtx<'a, Endian, T> for i64
where i64: FromCtx<Endian, T>, T: AsRef<[u8]>,

§

type Error = Error

source§

fn try_from_ctx(src: &'a T, le: Endian) -> Result<(Self, usize), Self::Error>

source§

impl<'a, T> TryFromCtx<'a, Endian, T> for i8
where i8: FromCtx<Endian, T>, T: AsRef<[u8]>,

§

type Error = Error

source§

fn try_from_ctx(src: &'a T, le: Endian) -> Result<(Self, usize), Self::Error>

source§

impl<'a, T> TryFromCtx<'a, Endian, T> for u128
where u128: FromCtx<Endian, T>, T: AsRef<[u8]>,

§

type Error = Error

source§

fn try_from_ctx(src: &'a T, le: Endian) -> Result<(Self, usize), Self::Error>

source§

impl<'a, T> TryFromCtx<'a, Endian, T> for u16
where u16: FromCtx<Endian, T>, T: AsRef<[u8]>,

§

type Error = Error

source§

fn try_from_ctx(src: &'a T, le: Endian) -> Result<(Self, usize), Self::Error>

source§

impl<'a, T> TryFromCtx<'a, Endian, T> for u32
where u32: FromCtx<Endian, T>, T: AsRef<[u8]>,

§

type Error = Error

source§

fn try_from_ctx(src: &'a T, le: Endian) -> Result<(Self, usize), Self::Error>

source§

impl<'a, T> TryFromCtx<'a, Endian, T> for u64
where u64: FromCtx<Endian, T>, T: AsRef<[u8]>,

§

type Error = Error

source§

fn try_from_ctx(src: &'a T, le: Endian) -> Result<(Self, usize), Self::Error>

source§

impl<'a, T> TryFromCtx<'a, Endian, T> for u8
where u8: FromCtx<Endian, T>, T: AsRef<[u8]>,

§

type Error = Error

source§

fn try_from_ctx(src: &'a T, le: Endian) -> Result<(Self, usize), Self::Error>

source§

impl<'a> TryIntoCtx<Endian> for &'a f32

§

type Error = Error

source§

fn try_into_ctx(self, dst: &mut [u8], le: Endian) -> Result<usize>

source§

impl<'a> TryIntoCtx<Endian> for &'a f64

§

type Error = Error

source§

fn try_into_ctx(self, dst: &mut [u8], le: Endian) -> Result<usize>

source§

impl<'a> TryIntoCtx<Endian> for &'a i128

§

type Error = Error

source§

fn try_into_ctx(self, dst: &mut [u8], le: Endian) -> Result<usize>

source§

impl<'a> TryIntoCtx<Endian> for &'a i16

§

type Error = Error

source§

fn try_into_ctx(self, dst: &mut [u8], le: Endian) -> Result<usize>

source§

impl<'a> TryIntoCtx<Endian> for &'a i32

§

type Error = Error

source§

fn try_into_ctx(self, dst: &mut [u8], le: Endian) -> Result<usize>

source§

impl<'a> TryIntoCtx<Endian> for &'a i64

§

type Error = Error

source§

fn try_into_ctx(self, dst: &mut [u8], le: Endian) -> Result<usize>

source§

impl<'a> TryIntoCtx<Endian> for &'a i8

§

type Error = Error

source§

fn try_into_ctx(self, dst: &mut [u8], le: Endian) -> Result<usize>

source§

impl<'a> TryIntoCtx<Endian> for &'a u128

§

type Error = Error

source§

fn try_into_ctx(self, dst: &mut [u8], le: Endian) -> Result<usize>

source§

impl<'a> TryIntoCtx<Endian> for &'a u16

§

type Error = Error

source§

fn try_into_ctx(self, dst: &mut [u8], le: Endian) -> Result<usize>

source§

impl<'a> TryIntoCtx<Endian> for &'a u32

§

type Error = Error

source§

fn try_into_ctx(self, dst: &mut [u8], le: Endian) -> Result<usize>

source§

impl<'a> TryIntoCtx<Endian> for &'a u64

§

type Error = Error

source§

fn try_into_ctx(self, dst: &mut [u8], le: Endian) -> Result<usize>

source§

impl<'a> TryIntoCtx<Endian> for &'a u8

§

type Error = Error

source§

fn try_into_ctx(self, dst: &mut [u8], le: Endian) -> Result<usize>

source§

impl TryIntoCtx<Endian> for f32
where f32: IntoCtx<Endian>,

§

type Error = Error

source§

fn try_into_ctx(self, dst: &mut [u8], le: Endian) -> Result<usize>

source§

impl TryIntoCtx<Endian> for f64
where f64: IntoCtx<Endian>,

§

type Error = Error

source§

fn try_into_ctx(self, dst: &mut [u8], le: Endian) -> Result<usize>

source§

impl TryIntoCtx<Endian> for i128

§

type Error = Error

source§

fn try_into_ctx(self, dst: &mut [u8], le: Endian) -> Result<usize>

source§

impl TryIntoCtx<Endian> for i16
where i16: IntoCtx<Endian>,

§

type Error = Error

source§

fn try_into_ctx(self, dst: &mut [u8], le: Endian) -> Result<usize>

source§

impl TryIntoCtx<Endian> for i32
where i32: IntoCtx<Endian>,

§

type Error = Error

source§

fn try_into_ctx(self, dst: &mut [u8], le: Endian) -> Result<usize>

source§

impl TryIntoCtx<Endian> for i64
where i64: IntoCtx<Endian>,

§

type Error = Error

source§

fn try_into_ctx(self, dst: &mut [u8], le: Endian) -> Result<usize>

source§

impl TryIntoCtx<Endian> for i8
where i8: IntoCtx<Endian>,

§

type Error = Error

source§

fn try_into_ctx(self, dst: &mut [u8], le: Endian) -> Result<usize>

source§

impl TryIntoCtx<Endian> for u128

§

type Error = Error

source§

fn try_into_ctx(self, dst: &mut [u8], le: Endian) -> Result<usize>

source§

impl TryIntoCtx<Endian> for u16
where u16: IntoCtx<Endian>,

§

type Error = Error

source§

fn try_into_ctx(self, dst: &mut [u8], le: Endian) -> Result<usize>

source§

impl TryIntoCtx<Endian> for u32
where u32: IntoCtx<Endian>,

§

type Error = Error

source§

fn try_into_ctx(self, dst: &mut [u8], le: Endian) -> Result<usize>

source§

impl TryIntoCtx<Endian> for u64
where u64: IntoCtx<Endian>,

§

type Error = Error

source§

fn try_into_ctx(self, dst: &mut [u8], le: Endian) -> Result<usize>

source§

impl TryIntoCtx<Endian> for u8
where u8: IntoCtx<Endian>,

§

type Error = Error

source§

fn try_into_ctx(self, dst: &mut [u8], le: Endian) -> Result<usize>

source§

impl Copy for Endian

source§

impl Eq for Endian

source§

impl StructuralEq for Endian

source§

impl StructuralPartialEq for Endian

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.