shah

Trait Binary

Source
pub trait Binary: Sized {
    const S: usize = _;
    const N: u64 = _;

    // Provided methods
    fn as_binary(&self) -> &[u8]  { ... }
    fn as_binary_mut(&mut self) -> &mut [u8]  { ... }
    fn from_binary(data: &[u8]) -> &Self { ... }
    fn from_binary_mut(data: &mut [u8]) -> &mut Self { ... }
    fn zeroed(&mut self) { ... }
}

Provided Associated Constants§

Source

const S: usize = _

Source

const N: u64 = _

Provided Methods§

Source

fn as_binary(&self) -> &[u8]

Source

fn as_binary_mut(&mut self) -> &mut [u8]

Source

fn from_binary(data: &[u8]) -> &Self

Source

fn from_binary_mut(data: &mut [u8]) -> &mut Self

Source

fn zeroed(&mut self)

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 Binary for bool

Source§

impl Binary for f32

Source§

impl Binary for f64

Source§

impl Binary for i8

Source§

impl Binary for i16

Source§

impl Binary for i32

Source§

impl Binary for i64

Source§

impl Binary for isize

Source§

impl Binary for u8

Source§

impl Binary for u16

Source§

impl Binary for u32

Source§

impl Binary for u64

Source§

impl Binary for usize

Source§

impl<const N: usize, T: Binary> Binary for [T; N]

Implementors§