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§
type Serialized: AsRef<[u8]>
Required Methods§
Sourcefn set_random_error(&mut self, value: bool)
fn set_random_error(&mut self, value: bool)
Set the flag indicating that the random generator could properly be created (false) or not (true)
Sourcefn get_random_error(&self) -> bool
fn get_random_error(&self) -> bool
Get the flag indicating that the random generator could properly be created (false) or not (true)
Sourcefn serialize(&self) -> Self::Serialized
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".