HostView

Struct HostView 

Source
pub struct HostView<'a, const TS: usize, const BS: usize, const BC: usize, AP, PP, PT, PK>
where BitsImpl<BC>: Bits, AP: AccessPolicy, PP: PersistPolicy<PK>, PT: PersistTrigger<PK>,
{ /* private fields */ }
Expand description

Application/host-side view of the shadow table.

Writes through this view mark blocks dirty and may trigger persistence. Reads and writes are subject to the configured access policy.

Implementations§

Source§

impl<'a, const TS: usize, const BS: usize, const BC: usize, AP, PP, PT, PK> HostView<'a, TS, BS, BC, AP, PP, PT, PK>
where BitsImpl<BC>: Bits, AP: AccessPolicy, PP: PersistPolicy<PK>, PT: PersistTrigger<PK>,

Source

pub fn read_range(&self, addr: u16, out: &mut [u8]) -> Result<(), ShadowError>

Reads data from the shadow table.

Returns Denied if the access policy rejects the read.

Source

pub fn write_range(&mut self, addr: u16, data: &[u8]) -> Result<(), ShadowError>

Writes data to the shadow table, marking blocks dirty.

May trigger persistence based on the configured policy.

Auto Trait Implementations§

§

impl<'a, const TS: usize, const BS: usize, const BC: usize, AP, PP, PT, PK> Freeze for HostView<'a, TS, BS, BC, AP, PP, PT, PK>

§

impl<'a, const TS: usize, const BS: usize, const BC: usize, AP, PP, PT, PK> !RefUnwindSafe for HostView<'a, TS, BS, BC, AP, PP, PT, PK>

§

impl<'a, const TS: usize, const BS: usize, const BC: usize, AP, PP, PT, PK> !Send for HostView<'a, TS, BS, BC, AP, PP, PT, PK>

§

impl<'a, const TS: usize, const BS: usize, const BC: usize, AP, PP, PT, PK> !Sync for HostView<'a, TS, BS, BC, AP, PP, PT, PK>

§

impl<'a, const TS: usize, const BS: usize, const BC: usize, AP, PP, PT, PK> Unpin for HostView<'a, TS, BS, BC, AP, PP, PT, PK>
where PK: Unpin,

§

impl<'a, const TS: usize, const BS: usize, const BC: usize, AP, PP, PT, PK> !UnwindSafe for HostView<'a, TS, BS, BC, AP, PP, PT, PK>

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.