Skip to main content

OpDispatcher

Struct OpDispatcher 

Source
pub struct OpDispatcher { /* private fields */ }
Expand description

Dispatches MMIO operations to specific handlers based on memory range.

Trait Implementations§

Source§

impl GenericVmoMemoryHandler for OpDispatcher

Source§

fn load<T: MmioOperand>(&self, op: VmoOpHelper<'_, T>) -> T

Handles an MMIO load operation for type T.
Source§

fn store<T: MmioOperand>(&self, op: VmoOpHelper<'_, T>, value: T)

Handles an MMIO store operation for type T.
Source§

impl MaybeVmoMemoryHandler for OpDispatcher

Source§

fn get_handler( &self, range: Range<usize>, ) -> Option<&(impl VmoMemoryHandler + ?Sized)>

Returns a VmoMemoryHandler if range can be operated on by the implementer.

Auto Trait Implementations§

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<O> DispatchHandler for O
where O: VmoMemoryHandler + Send + Sync + 'static,

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<H> RegistryHandler for H
where H: VmoMemoryHandler + Send + Sync + 'static,

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<O> VmoMemoryHandler for O

Source§

fn load8(&self, op: VmoOpHelper<'_, u8>) -> u8

Handles an 8-bit MMIO load operation.
Source§

fn load16(&self, op: VmoOpHelper<'_, u16>) -> u16

Handles a 16-bit MMIO load operation.
Source§

fn load32(&self, op: VmoOpHelper<'_, u32>) -> u32

Handles a 32-bit MMIO load operation.
Source§

fn load64(&self, op: VmoOpHelper<'_, u64>) -> u64

Handles a 64-bit MMIO load operation.
Source§

fn store8(&self, op: VmoOpHelper<'_, u8>, value: u8)

Handles an 8-bit MMIO store operation.
Source§

fn store16(&self, op: VmoOpHelper<'_, u16>, value: u16)

Handles a 16-bit MMIO store operation.
Source§

fn store32(&self, op: VmoOpHelper<'_, u32>, value: u32)

Handles a 32-bit MMIO store operation.
Source§

fn store64(&self, op: VmoOpHelper<'_, u64>, value: u64)

Handles a 64-bit MMIO store operation.