Trait kernel::hwrng::Operations
source · [−]pub trait Operations {
type Data: PointerWrapper + Send + Sync = ();
const USE_VTABLE_ATTR: ();
const HAS_INIT: bool = false;
const HAS_CLEANUP: bool = false;
const HAS_READ: bool = false;
fn read(
data: <Self::Data as PointerWrapper>::Borrowed<'_>,
buffer: &mut [u8],
wait: bool
) -> Result<u32>;
fn init(_data: <Self::Data as PointerWrapper>::Borrowed<'_>) -> Result { ... }
fn cleanup(_data: Self::Data) { ... }
}
Expand description
This trait is implemented in order to provide callbacks to struct hwrng
.
Provided Associated Types
Required Associated Constants
const USE_VTABLE_ATTR: ()
const USE_VTABLE_ATTR: ()
A marker to prevent implementors from forgetting to use #[vtable]
attribute when implementing this trait.
Provided Associated Constants
const HAS_CLEANUP: bool = false
const HAS_CLEANUP: bool = false
Indicates if the cleanup
method is overridden by the implementor.
Required Methods
Provided Methods
Initialization callback, can be left undefined.