RandomlyConstructable

Trait RandomlyConstructable 

Source
pub trait RandomlyConstructable: Sized {
    // Required methods
    fn zero() -> Self;
    fn as_mut_bytes(&mut self) -> &mut [u8] ;
}
Expand description

A sealed trait for types that can be randomly constructed.

Required Methods§

Source

fn zero() -> Self

Returns a zeroed instance of the type.

Source

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

Returns a mutable byte slice of the value.

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<const T: usize> RandomlyConstructable for [u8; T]

Source§

fn zero() -> Self

Source§

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

Implementors§