pub struct VmStore<'rcu> {
pub regions: MetaRegionOwners,
pub vm_spaces: Map<VmSpaceId, VmSpaceOwner>,
pub cursors: Map<CursorId, CursorEntry<'rcu>>,
pub vm_ios: Map<VmIoId, VmIoEntry>,
}Expand description
Resource store: the abstract state visible to a caller of the VmSpace API.
Stage 2 tracks regions, vm_spaces, and cursors. Later stages add
vm_ios.
Fields§
§regions: MetaRegionOwners§vm_spaces: Map<VmSpaceId, VmSpaceOwner>§cursors: Map<CursorId, CursorEntry<'rcu>>§vm_ios: Map<VmIoId, VmIoEntry>Implementations§
Source§impl<'a, 'rcu> VmStore<'rcu>
impl<'a, 'rcu> VmStore<'rcu>
Sourcepub open spec fn inv(self) -> bool
pub open spec fn inv(self) -> bool
{
&&& self.regions.inv()
&&& forall |id: VmSpaceId| {
#[trigger] self.vm_spaces.dom().contains(id) ==> self.vm_spaces[id].inv()
}
&&& forall |id: CursorId| {
#[trigger] self.cursors.dom().contains(id) ==> self.cursors[id].owner.inv()
}
&&& forall |id: CursorId| {
#[trigger] self.cursors.dom().contains(id)
==> self.vm_spaces.dom().contains(self.cursors[id].vm_space)
}
&&& forall |id: VmIoId| {
#[trigger] self.vm_ios.dom().contains(id) ==> self.vm_ios[id].owner.inv()
}
&&& forall |id: VmIoId| {
#[trigger] self.vm_ios.dom().contains(id)
==> self.vm_spaces.dom().contains(self.vm_ios[id].vm_space)
}
}The store’s top-level invariant. Aggregates the per-component invariants of every owner the store holds, plus cross-store consistency (every cursor and every VmIo refers to a live VmSpace).
Auto Trait Implementations§
impl<'rcu> Freeze for VmStore<'rcu>
impl<'rcu> !RefUnwindSafe for VmStore<'rcu>
impl<'rcu> Send for VmStore<'rcu>
impl<'rcu> Sync for VmStore<'rcu>
impl<'rcu> Unpin for VmStore<'rcu>
impl<'rcu> UnsafeUnpin for VmStore<'rcu>
impl<'rcu> !UnwindSafe for VmStore<'rcu>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more