Trait kernel::hwrng::Operations
source · [−]pub trait Operations {
type Data: ForeignOwnable + 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 ForeignOwnable>::Borrowed<'_>,
buffer: &mut [u8],
wait: bool
) -> Result<u32>;
fn init(_data: <Self::Data as ForeignOwnable>::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
sourceconst 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
sourceconst HAS_CLEANUP: bool = false
const HAS_CLEANUP: bool = false
Indicates if the cleanup
method is overridden by the implementor.