Trait cw_storage_plus::Endian [−][src]
pub trait Endian: Sized + Copy { type Buf: AsRef<[u8]> + AsMut<[u8]> + Into<Vec<u8>> + Default; fn to_le_bytes(self) -> Self::Buf; fn to_be_bytes(self) -> Self::Buf; fn from_le_bytes(bytes: Self::Buf) -> Self; fn from_be_bytes(bytes: Self::Buf) -> Self; }
Associated Types
Loading content...Required methods
fn to_le_bytes(self) -> Self::Buf
[src]
fn to_be_bytes(self) -> Self::Buf
[src]
fn from_le_bytes(bytes: Self::Buf) -> Self
[src]
fn from_be_bytes(bytes: Self::Buf) -> Self
[src]
Implementations on Foreign Types
impl Endian for i8
[src]
impl Endian for i8
[src]type Buf = [u8; 1]
fn to_le_bytes(self) -> Self::Buf
[src]
fn to_be_bytes(self) -> Self::Buf
[src]
fn from_le_bytes(bytes: Self::Buf) -> Self
[src]
fn from_be_bytes(bytes: Self::Buf) -> Self
[src]
impl Endian for i16
[src]
impl Endian for i16
[src]type Buf = [u8; 2]
fn to_le_bytes(self) -> Self::Buf
[src]
fn to_be_bytes(self) -> Self::Buf
[src]
fn from_le_bytes(bytes: Self::Buf) -> Self
[src]
fn from_be_bytes(bytes: Self::Buf) -> Self
[src]
impl Endian for i32
[src]
impl Endian for i32
[src]type Buf = [u8; 4]
fn to_le_bytes(self) -> Self::Buf
[src]
fn to_be_bytes(self) -> Self::Buf
[src]
fn from_le_bytes(bytes: Self::Buf) -> Self
[src]
fn from_be_bytes(bytes: Self::Buf) -> Self
[src]
impl Endian for i64
[src]
impl Endian for i64
[src]type Buf = [u8; 8]
fn to_le_bytes(self) -> Self::Buf
[src]
fn to_be_bytes(self) -> Self::Buf
[src]
fn from_le_bytes(bytes: Self::Buf) -> Self
[src]
fn from_be_bytes(bytes: Self::Buf) -> Self
[src]
impl Endian for i128
[src]
impl Endian for i128
[src]type Buf = [u8; 16]
fn to_le_bytes(self) -> Self::Buf
[src]
fn to_be_bytes(self) -> Self::Buf
[src]
fn from_le_bytes(bytes: Self::Buf) -> Self
[src]
fn from_be_bytes(bytes: Self::Buf) -> Self
[src]
impl Endian for u8
[src]
impl Endian for u8
[src]type Buf = [u8; 1]
fn to_le_bytes(self) -> Self::Buf
[src]
fn to_be_bytes(self) -> Self::Buf
[src]
fn from_le_bytes(bytes: Self::Buf) -> Self
[src]
fn from_be_bytes(bytes: Self::Buf) -> Self
[src]
impl Endian for u16
[src]
impl Endian for u16
[src]type Buf = [u8; 2]
fn to_le_bytes(self) -> Self::Buf
[src]
fn to_be_bytes(self) -> Self::Buf
[src]
fn from_le_bytes(bytes: Self::Buf) -> Self
[src]
fn from_be_bytes(bytes: Self::Buf) -> Self
[src]
impl Endian for u32
[src]
impl Endian for u32
[src]type Buf = [u8; 4]
fn to_le_bytes(self) -> Self::Buf
[src]
fn to_be_bytes(self) -> Self::Buf
[src]
fn from_le_bytes(bytes: Self::Buf) -> Self
[src]
fn from_be_bytes(bytes: Self::Buf) -> Self
[src]
impl Endian for u64
[src]
impl Endian for u64
[src]type Buf = [u8; 8]
fn to_le_bytes(self) -> Self::Buf
[src]
fn to_be_bytes(self) -> Self::Buf
[src]
fn from_le_bytes(bytes: Self::Buf) -> Self
[src]
fn from_be_bytes(bytes: Self::Buf) -> Self
[src]
impl Endian for u128
[src]
impl Endian for u128
[src]