Skip to main content

StatusBytes

Trait StatusBytes 

Source
pub trait StatusBytes {
    type Serialized: AsRef<[u8]>;

    // Required methods
    fn set_random_error(&mut self, value: bool);
    fn get_random_error(&self) -> bool;
    fn serialize(&self) -> Self::Serialized;
}
Expand description

Trait indicating that a value can be used as a status

Required Associated Types§

Required Methods§

Source

fn set_random_error(&mut self, value: bool)

Set the flag indicating that the random generator could properly be created (false) or not (true)

Source

fn get_random_error(&self) -> bool

Get the flag indicating that the random generator could properly be created (false) or not (true)

Source

fn serialize(&self) -> Self::Serialized

Serialize the StatusBytes to raw bytes

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§