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; }
Expand description

Any object implementing SpecificEndian<T> can be converted between big and little endian. Implement this trait to allow for endian conversion by this crate.

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

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl SpecificEndian<bool> for bool

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<f32> for f32

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

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

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<i16> for i16

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

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

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

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

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

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<u16> for u16

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

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

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

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

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§