irox_bits

Trait ToBEBytes

Source
pub trait ToBEBytes<const N: usize> {
    // Required method
    fn to_be_bytes(&self) -> [u8; N];
}
Expand description

Converts the value into a constant number of bytes

Required Methods§

Source

fn to_be_bytes(&self) -> [u8; N]

Implementations on Foreign Types§

Source§

impl ToBEBytes<1> for u8

Source§

fn to_be_bytes(&self) -> [u8; 1]

Source§

impl ToBEBytes<2> for u16

Source§

fn to_be_bytes(&self) -> [u8; 2]

Source§

impl ToBEBytes<4> for f32

Source§

fn to_be_bytes(&self) -> [u8; 4]

Source§

impl ToBEBytes<4> for u32

Source§

fn to_be_bytes(&self) -> [u8; 4]

Source§

impl ToBEBytes<8> for f64

Source§

fn to_be_bytes(&self) -> [u8; 8]

Source§

impl ToBEBytes<8> for u64

Source§

fn to_be_bytes(&self) -> [u8; 8]

Source§

impl ToBEBytes<8> for [f32; 2]

Source§

fn to_be_bytes(&self) -> [u8; 8]

Source§

impl ToBEBytes<16> for u128

Source§

fn to_be_bytes(&self) -> [u8; 16]

Source§

impl ToBEBytes<16> for [f64; 2]

Source§

fn to_be_bytes(&self) -> [u8; 16]

Source§

impl ToBEBytes<16> for [u64; 2]

Source§

fn to_be_bytes(&self) -> [u8; 16]

Source§

impl ToBEBytes<32> for [u128; 2]

Source§

fn to_be_bytes(&self) -> [u8; 32]

Source§

impl<const N: usize, const Y: usize> ToBEBytes<Y> for [u32; N]

Source§

fn to_be_bytes(&self) -> [u8; Y]

Implementors§