Struct VirtIORng

Source
pub struct VirtIORng<'a, 'b> { /* private fields */ }

Implementations§

Source§

impl<'a, 'b> VirtIORng<'a, 'b>

Source

pub fn new(virtqueue: &'a SplitVirtqueue<'a, 'b, 1>) -> VirtIORng<'a, 'b>

Source

pub fn provide_buffer( &self, buf: &'b mut [u8], ) -> Result<usize, (&'b mut [u8], ErrorCode)>

Trait Implementations§

Source§

impl DeferredCallClient for VirtIORng<'_, '_>

Source§

fn register(&'static self)

Source§

fn handle_deferred_call(&self)

Software interrupt function that is called when the deferred call is triggered.
Source§

impl<'a> Rng<'a> for VirtIORng<'a, '_>

Source§

fn get(&self) -> Result<(), ErrorCode>

Initiate the aquisition of new random number generation. Read more
Source§

fn cancel(&self) -> Result<(), ErrorCode>

Cancel acquisition of random numbers. Read more
Source§

fn set_client(&self, client: &'a dyn RngClient)

Source§

impl<'b> SplitVirtqueueClient<'b> for VirtIORng<'_, 'b>

Source§

fn buffer_chain_ready( &self, _queue_number: u32, buffer_chain: &mut [Option<VirtqueueBuffer<'b>>], bytes_used: usize, )

Source§

impl VirtIODeviceDriver for VirtIORng<'_, '_>

Source§

fn negotiate_features(&self, _offered_features: u64) -> Option<u64>

VirtIO feature negotiation. Read more
Source§

fn device_type(&self) -> VirtIODeviceType

VirtIO device type which the driver supports. Read more
Source§

fn pre_device_initialization(&self) -> Result<(), ErrorCode>

Hook called before the transport indicates DRIVER_OK to the device. Read more
Source§

fn device_initialized(&self) -> Result<(), ErrorCode>

Hook called after the transport indicated DRIVER_OK to the device. Read more

Auto Trait Implementations§

§

impl<'a, 'b> !Freeze for VirtIORng<'a, 'b>

§

impl<'a, 'b> !RefUnwindSafe for VirtIORng<'a, 'b>

§

impl<'a, 'b> !Send for VirtIORng<'a, 'b>

§

impl<'a, 'b> !Sync for VirtIORng<'a, 'b>

§

impl<'a, 'b> Unpin for VirtIORng<'a, 'b>

§

impl<'a, 'b> !UnwindSafe for VirtIORng<'a, 'b>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.