SpecificEndian

Trait SpecificEndian 

Source
pub trait SpecificEndian<T>
where Self: Into<T> + Clone + Copy,
{ // Required methods fn to_big_endian(&self) -> T; fn to_little_endian(&self) -> T; fn from_big_endian(&self) -> T; fn from_little_endian(&self) -> T; // Provided method fn endian(&self) -> Endian { ... } }

Required Methods§

Source

fn to_big_endian(&self) -> T

Source

fn to_little_endian(&self) -> T

Source

fn from_big_endian(&self) -> T

Source

fn from_little_endian(&self) -> T

Provided Methods§

Source

fn endian(&self) -> Endian

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl SpecificEndian<bool> for bool

Available on crate features simple_specific_endian_bridge and simple_bool only.
Source§

impl SpecificEndian<char> for char

Available on crate features simple_specific_endian_bridge and simple_char_impls only.
Source§

impl SpecificEndian<f32> for f32

Available on crate feature float_impls only.
Source§

fn to_big_endian(&self) -> Self

Source§

fn to_little_endian(&self) -> Self

Source§

fn from_big_endian(&self) -> Self

Source§

fn from_little_endian(&self) -> Self

Source§

impl SpecificEndian<f64> for f64

Available on crate feature float_impls only.
Source§

fn to_big_endian(&self) -> Self

Source§

fn to_little_endian(&self) -> Self

Source§

fn from_big_endian(&self) -> Self

Source§

fn from_little_endian(&self) -> Self

Source§

impl SpecificEndian<i8> for i8

Available on crate features simple_specific_endian_bridge and simple_byte_impls only.
Source§

impl SpecificEndian<i16> for i16

Available on crate feature integer_impls only.
Source§

fn to_big_endian(&self) -> Self

Source§

fn to_little_endian(&self) -> Self

Source§

fn from_big_endian(&self) -> Self

Source§

fn from_little_endian(&self) -> Self

Source§

impl SpecificEndian<i32> for i32

Available on crate feature integer_impls only.
Source§

fn to_big_endian(&self) -> Self

Source§

fn to_little_endian(&self) -> Self

Source§

fn from_big_endian(&self) -> Self

Source§

fn from_little_endian(&self) -> Self

Source§

impl SpecificEndian<i64> for i64

Available on crate feature integer_impls only.
Source§

fn to_big_endian(&self) -> Self

Source§

fn to_little_endian(&self) -> Self

Source§

fn from_big_endian(&self) -> Self

Source§

fn from_little_endian(&self) -> Self

Source§

impl SpecificEndian<i128> for i128

Available on crate feature integer_impls only.
Source§

fn to_big_endian(&self) -> Self

Source§

fn to_little_endian(&self) -> Self

Source§

fn from_big_endian(&self) -> Self

Source§

fn from_little_endian(&self) -> Self

Source§

impl SpecificEndian<isize> for isize

Available on crate feature integer_impls only.
Source§

fn to_big_endian(&self) -> Self

Source§

fn to_little_endian(&self) -> Self

Source§

fn from_big_endian(&self) -> Self

Source§

fn from_little_endian(&self) -> Self

Source§

impl SpecificEndian<u8> for u8

Available on crate features simple_specific_endian_bridge and simple_byte_impls only.
Source§

impl SpecificEndian<u16> for u16

Available on crate feature integer_impls only.
Source§

fn to_big_endian(&self) -> Self

Source§

fn to_little_endian(&self) -> Self

Source§

fn from_big_endian(&self) -> Self

Source§

fn from_little_endian(&self) -> Self

Source§

impl SpecificEndian<u32> for u32

Available on crate feature integer_impls only.
Source§

fn to_big_endian(&self) -> Self

Source§

fn to_little_endian(&self) -> Self

Source§

fn from_big_endian(&self) -> Self

Source§

fn from_little_endian(&self) -> Self

Source§

impl SpecificEndian<u64> for u64

Available on crate feature integer_impls only.
Source§

fn to_big_endian(&self) -> Self

Source§

fn to_little_endian(&self) -> Self

Source§

fn from_big_endian(&self) -> Self

Source§

fn from_little_endian(&self) -> Self

Source§

impl SpecificEndian<u128> for u128

Available on crate feature integer_impls only.
Source§

fn to_big_endian(&self) -> Self

Source§

fn to_little_endian(&self) -> Self

Source§

fn from_big_endian(&self) -> Self

Source§

fn from_little_endian(&self) -> Self

Source§

impl SpecificEndian<usize> for usize

Available on crate feature integer_impls only.
Source§

fn to_big_endian(&self) -> Self

Source§

fn to_little_endian(&self) -> Self

Source§

fn from_big_endian(&self) -> Self

Source§

fn from_little_endian(&self) -> Self

Source§

impl SpecificEndian<NonZero<i8>> for NonZeroI8

Available on crate features integer_impls and nonzero only.
Source§

fn to_big_endian(&self) -> Self

Source§

fn to_little_endian(&self) -> Self

Source§

fn from_big_endian(&self) -> Self

Source§

fn from_little_endian(&self) -> Self

Source§

impl SpecificEndian<NonZero<i16>> for NonZeroI16

Available on crate features integer_impls and nonzero only.
Source§

fn to_big_endian(&self) -> Self

Source§

fn to_little_endian(&self) -> Self

Source§

fn from_big_endian(&self) -> Self

Source§

fn from_little_endian(&self) -> Self

Source§

impl SpecificEndian<NonZero<i32>> for NonZeroI32

Available on crate features integer_impls and nonzero only.
Source§

fn to_big_endian(&self) -> Self

Source§

fn to_little_endian(&self) -> Self

Source§

fn from_big_endian(&self) -> Self

Source§

fn from_little_endian(&self) -> Self

Source§

impl SpecificEndian<NonZero<i64>> for NonZeroI64

Available on crate features integer_impls and nonzero only.
Source§

fn to_big_endian(&self) -> Self

Source§

fn to_little_endian(&self) -> Self

Source§

fn from_big_endian(&self) -> Self

Source§

fn from_little_endian(&self) -> Self

Source§

impl SpecificEndian<NonZero<i128>> for NonZeroI128

Available on crate features integer_impls and nonzero only.
Source§

fn to_big_endian(&self) -> Self

Source§

fn to_little_endian(&self) -> Self

Source§

fn from_big_endian(&self) -> Self

Source§

fn from_little_endian(&self) -> Self

Source§

impl SpecificEndian<NonZero<isize>> for NonZeroIsize

Available on crate features integer_impls and nonzero only.
Source§

fn to_big_endian(&self) -> Self

Source§

fn to_little_endian(&self) -> Self

Source§

fn from_big_endian(&self) -> Self

Source§

fn from_little_endian(&self) -> Self

Source§

impl SpecificEndian<NonZero<u8>> for NonZeroU8

Available on crate features integer_impls and nonzero only.
Source§

fn to_big_endian(&self) -> Self

Source§

fn to_little_endian(&self) -> Self

Source§

fn from_big_endian(&self) -> Self

Source§

fn from_little_endian(&self) -> Self

Source§

impl SpecificEndian<NonZero<u16>> for NonZeroU16

Available on crate features integer_impls and nonzero only.
Source§

fn to_big_endian(&self) -> Self

Source§

fn to_little_endian(&self) -> Self

Source§

fn from_big_endian(&self) -> Self

Source§

fn from_little_endian(&self) -> Self

Source§

impl SpecificEndian<NonZero<u32>> for NonZeroU32

Available on crate features integer_impls and nonzero only.
Source§

fn to_big_endian(&self) -> Self

Source§

fn to_little_endian(&self) -> Self

Source§

fn from_big_endian(&self) -> Self

Source§

fn from_little_endian(&self) -> Self

Source§

impl SpecificEndian<NonZero<u64>> for NonZeroU64

Available on crate features integer_impls and nonzero only.
Source§

fn to_big_endian(&self) -> Self

Source§

fn to_little_endian(&self) -> Self

Source§

fn from_big_endian(&self) -> Self

Source§

fn from_little_endian(&self) -> Self

Source§

impl SpecificEndian<NonZero<u128>> for NonZeroU128

Available on crate features integer_impls and nonzero only.
Source§

fn to_big_endian(&self) -> Self

Source§

fn to_little_endian(&self) -> Self

Source§

fn from_big_endian(&self) -> Self

Source§

fn from_little_endian(&self) -> Self

Source§

impl SpecificEndian<NonZero<usize>> for NonZeroUsize

Available on crate features integer_impls and nonzero only.
Source§

fn to_big_endian(&self) -> Self

Source§

fn to_little_endian(&self) -> Self

Source§

fn from_big_endian(&self) -> Self

Source§

fn from_little_endian(&self) -> Self

Source§

impl<A, B> SpecificEndian<(A, B)> for (A, B)
where A: SpecificEndian<A> + Copy + Clone, B: SpecificEndian<B> + Copy + Clone,

Source§

impl<A, B, C> SpecificEndian<(A, B, C)> for (A, B, C)
where A: SpecificEndian<A> + Copy + Clone, B: SpecificEndian<B> + Copy + Clone, C: SpecificEndian<C> + Copy + Clone,

Source§

impl<A, B, C, D> SpecificEndian<(A, B, C, D)> for (A, B, C, D)

Source§

impl<A, B, C, D, E> SpecificEndian<(A, B, C, D, E)> for (A, B, C, D, E)

Source§

impl<A, B, C, D, E, F> SpecificEndian<(A, B, C, D, E, F)> for (A, B, C, D, E, F)

Source§

impl<A, B, C, D, E, F, G> SpecificEndian<(A, B, C, D, E, F, G)> for (A, B, C, D, E, F, G)

Source§

impl<A, B, C, D, E, F, G, H> SpecificEndian<(A, B, C, D, E, F, G, H)> for (A, B, C, D, E, F, G, H)

Source§

impl<A, B, C, D, E, F, G, H, I> SpecificEndian<(A, B, C, D, E, F, G, H, I)> for (A, B, C, D, E, F, G, H, I)

Source§

impl<A, B, C, D, E, F, G, H, I, J> SpecificEndian<(A, B, C, D, E, F, G, H, I, J)> for (A, B, C, D, E, F, G, H, I, J)

Source§

impl<A, B, C, D, E, F, G, H, I, J, K> SpecificEndian<(A, B, C, D, E, F, G, H, I, J, K)> for (A, B, C, D, E, F, G, H, I, J, K)

Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> SpecificEndian<(A, B, C, D, E, F, G, H, I, J, K, L)> for (A, B, C, D, E, F, G, H, I, J, K, L)

Source§

impl<T> SpecificEndian<Wrapping<T>> for Wrapping<T>
where T: SpecificEndian<T>,

Available on crate features integer_impls and wrapping only.
Source§

fn to_big_endian(&self) -> Self

Source§

fn to_little_endian(&self) -> Self

Source§

fn from_big_endian(&self) -> Self

Source§

fn from_little_endian(&self) -> Self

Implementors§

Source§

impl<const N: usize> SpecificEndian<FixedUtf16CodeUnitsEndian<BigEndian<u16>, N>> for FixedUtf16BeCodeUnits<N>

Available on crate feature text_fixed and crate feature text_utf16 and (crate features text_utf8 or text_utf16 or text_utf32 or text_fixed) only.
Source§

impl<const N: usize> SpecificEndian<FixedUtf16CodeUnitsEndian<LittleEndian<u16>, N>> for FixedUtf16LeCodeUnits<N>

Available on crate feature text_fixed and crate feature text_utf16 and (crate features text_utf8 or text_utf16 or text_utf32 or text_fixed) only.
Source§

impl<const N: usize> SpecificEndian<FixedUtf32CodeUnitsEndian<BigEndian<u32>, N>> for FixedUtf32BeCodeUnits<N>

Available on crate feature text_fixed and crate feature text_utf32 and (crate features text_utf8 or text_utf16 or text_utf32 or text_fixed) only.
Source§

impl<const N: usize> SpecificEndian<FixedUtf32CodeUnitsEndian<LittleEndian<u32>, N>> for FixedUtf32LeCodeUnits<N>

Available on crate feature text_fixed and crate feature text_utf32 and (crate features text_utf8 or text_utf16 or text_utf32 or text_fixed) only.