Trait rand_core::impls::Observable

source ·
trait Observable: Copy {
    type Bytes: AsRef<[u8]>;

    // Required methods
    fn to_le_bytes(self) -> Self::Bytes;
    fn as_byte_slice(x: &[Self]) -> &[u8] ;
}

Required Associated Types§

Required Methods§

source

fn to_le_bytes(self) -> Self::Bytes

source

fn as_byte_slice(x: &[Self]) -> &[u8]

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Observable for u32

source§

type Bytes = [u8; 4]

source§

fn to_le_bytes(self) -> Self::Bytes

source§

fn as_byte_slice(x: &[Self]) -> &[u8]

source§

impl Observable for u64

source§

type Bytes = [u8; 8]

source§

fn to_le_bytes(self) -> Self::Bytes

source§

fn as_byte_slice(x: &[Self]) -> &[u8]

Implementors§