pub enum MetaSlotStorage {
Empty([u8; 39]),
Untyped,
FrameLink(StoredLink),
PTNode(StoredPageTablePageMeta),
}Variants§
Implementations§
Source§impl MetaSlotStorage
impl MetaSlotStorage
pub fn arrow_0(self) -> StoredPageTablePageMeta
pub fn arrow_Empty_0(self) -> [u8; 39]
pub fn arrow_FrameLink_0(self) -> StoredLink
pub fn arrow_PTNode_0(self) -> StoredPageTablePageMeta
Source§impl MetaSlotStorage
impl MetaSlotStorage
Sourcepub open spec fn get_link_spec(self) -> Option<StoredLink>
pub open spec fn get_link_spec(self) -> Option<StoredLink>
{
match self {
MetaSlotStorage::FrameLink(link) => Some(link),
_ => None,
}
}Sourcepub exec fn get_link(self) -> res : Option<StoredLink>
pub exec fn get_link(self) -> res : Option<StoredLink>
ensures
res == self.get_link_spec(),Sourcepub open spec fn get_node_spec(self) -> Option<StoredPageTablePageMeta>
pub open spec fn get_node_spec(self) -> Option<StoredPageTablePageMeta>
{
match self {
MetaSlotStorage::PTNode(node) => Some(node),
_ => None,
}
}Sourcepub exec fn get_node(self) -> res : Option<StoredPageTablePageMeta>
pub exec fn get_node(self) -> res : Option<StoredPageTablePageMeta>
ensures
res == self.get_node_spec(),Trait Implementations§
Source§impl AnyFrameMeta for MetaSlotStorage
MetaSlotStorage is an inductive tagged union of all of the frame meta types that
we work with in this development. So, it should itself implement AnyFrameMeta, and
it can then be used to stand in for dyn AnyFrameMeta.
impl AnyFrameMeta for MetaSlotStorage
MetaSlotStorage is an inductive tagged union of all of the frame meta types that
we work with in this development. So, it should itself implement AnyFrameMeta, and
it can then be used to stand in for dyn AnyFrameMeta.
Source§impl<M: AnyFrameMeta + Repr<MetaSlotSmall>> Repr<MetaSlotStorage> for Link<M>
impl<M: AnyFrameMeta + Repr<MetaSlotSmall>> Repr<MetaSlotStorage> for Link<M>
Source§open spec fn wf(r: MetaSlotStorage, perm: LinkInnerPerms<M>) -> bool
open spec fn wf(r: MetaSlotStorage, perm: LinkInnerPerms<M>) -> bool
{
match r {
MetaSlotStorage::FrameLink(link) => (
&&& M::wf(link.slot, perm.storage)
&&& (link.next is Some) == (perm.next_ptr is Some)
&&& (link.prev is Some) == (perm.prev_ptr is Some)
),
_ => false,
}
}Source§open spec fn to_repr_spec(
self,
perm: LinkInnerPerms<M>,
) -> (MetaSlotStorage, LinkInnerPerms<M>)
open spec fn to_repr_spec( self, perm: LinkInnerPerms<M>, ) -> (MetaSlotStorage, LinkInnerPerms<M>)
{
let (slot, storage) = self.meta.to_repr_spec(perm.storage);
(
MetaSlotStorage::FrameLink(StoredLink {
next: match self.next {
Some(ptr) => Some(ptr.addr),
None => None,
},
prev: match self.prev {
Some(ptr) => Some(ptr.addr),
None => None,
},
slot,
}),
LinkInnerPerms {
storage,
next_ptr: match self.next {
Some(ptr) => Some(ptr.ptr),
None => None,
},
prev_ptr: match self.prev {
Some(ptr) => Some(ptr.ptr),
None => None,
},
},
)
}Source§exec fn to_repr(
self,
verus_tmp_perm: Tracked<&mut LinkInnerPerms<M>>,
) -> MetaSlotStorage
exec fn to_repr( self, verus_tmp_perm: Tracked<&mut LinkInnerPerms<M>>, ) -> MetaSlotStorage
Source§open spec fn from_repr_spec(r: MetaSlotStorage, perm: LinkInnerPerms<M>) -> Self
open spec fn from_repr_spec(r: MetaSlotStorage, perm: LinkInnerPerms<M>) -> Self
{
match r {
MetaSlotStorage::FrameLink(link) => {
Link {
next: match link.next {
Some(addr) => {
Some(ReprPtr {
addr,
ptr: perm.next_ptr.unwrap(),
_T: PhantomData,
})
}
None => None,
},
prev: match link.prev {
Some(addr) => {
Some(ReprPtr {
addr,
ptr: perm.prev_ptr.unwrap(),
_T: PhantomData,
})
}
None => None,
},
meta: M::from_repr_spec(link.slot, perm.storage),
}
}
_ => {
Link {
next: None,
prev: None,
meta: M::from_repr_spec(MetaSlotSmall, perm.storage),
}
}
}
}Source§exec fn from_repr(
r: MetaSlotStorage,
verus_tmp_perm: Tracked<&LinkInnerPerms<M>>,
) -> Self
exec fn from_repr( r: MetaSlotStorage, verus_tmp_perm: Tracked<&LinkInnerPerms<M>>, ) -> Self
Source§exec fn from_borrowed<'a>(
r: &'a MetaSlotStorage,
verus_tmp_perm: Tracked<&'a LinkInnerPerms<M>>,
) -> &'a Self
exec fn from_borrowed<'a>( r: &'a MetaSlotStorage, verus_tmp_perm: Tracked<&'a LinkInnerPerms<M>>, ) -> &'a Self
Source§proof fn from_to_repr(self, perm: LinkInnerPerms<M>)
proof fn from_to_repr(self, perm: LinkInnerPerms<M>)
Source§proof fn to_from_repr(r: MetaSlotStorage, perm: LinkInnerPerms<M>)
proof fn to_from_repr(r: MetaSlotStorage, perm: LinkInnerPerms<M>)
Source§proof fn to_repr_wf(self, perm: LinkInnerPerms<M>)
proof fn to_repr_wf(self, perm: LinkInnerPerms<M>)
Source§type Perm = LinkInnerPerms<M>
type Perm = LinkInnerPerms<M>
If the underlying representation contains cells, the translation may require permission objects that access them.
Source§impl Repr<MetaSlotStorage> for MetaSlotStorage
impl Repr<MetaSlotStorage> for MetaSlotStorage
Source§open spec fn to_repr_spec(self, perm: ()) -> (MetaSlotStorage, ())
open spec fn to_repr_spec(self, perm: ()) -> (MetaSlotStorage, ())
{ (self, ()) }Source§exec fn to_repr(self, Tracked(perm): Tracked<&mut ()>) -> MetaSlotStorage
exec fn to_repr(self, Tracked(perm): Tracked<&mut ()>) -> MetaSlotStorage
Source§open spec fn from_repr_spec(slot: MetaSlotStorage, perm: ()) -> Self
open spec fn from_repr_spec(slot: MetaSlotStorage, perm: ()) -> Self
{ slot }Source§exec fn from_repr(slot: MetaSlotStorage, Tracked(perm): Tracked<&()>) -> Self
exec fn from_repr(slot: MetaSlotStorage, Tracked(perm): Tracked<&()>) -> Self
Source§exec fn from_borrowed<'a>(
slot: &'a MetaSlotStorage,
verus_tmp_perm: Tracked<&'a ()>,
) -> &'a Self
exec fn from_borrowed<'a>( slot: &'a MetaSlotStorage, verus_tmp_perm: Tracked<&'a ()>, ) -> &'a Self
Source§proof fn from_to_repr(self, perm: ())
proof fn from_to_repr(self, perm: ())
Source§proof fn to_from_repr(slot: MetaSlotStorage, perm: ())
proof fn to_from_repr(slot: MetaSlotStorage, perm: ())
Source§proof fn to_repr_wf(self, perm: ())
proof fn to_repr_wf(self, perm: ())
Source§impl<C: PageTableConfig> Repr<MetaSlotStorage> for PageTablePageMeta<C>
impl<C: PageTableConfig> Repr<MetaSlotStorage> for PageTablePageMeta<C>
Source§open spec fn wf(r: MetaSlotStorage, perm: ()) -> bool
open spec fn wf(r: MetaSlotStorage, perm: ()) -> bool
{ matches!(r, MetaSlotStorage::PTNode(_)) }Source§open spec fn to_repr_spec(self, perm: ()) -> (MetaSlotStorage, ())
open spec fn to_repr_spec(self, perm: ()) -> (MetaSlotStorage, ())
{ (MetaSlotStorage::PTNode(self.into_spec()), ()) }Source§exec fn to_repr(self, Tracked(perm): Tracked<&mut ()>) -> MetaSlotStorage
exec fn to_repr(self, Tracked(perm): Tracked<&mut ()>) -> MetaSlotStorage
Source§open spec fn from_repr_spec(r: MetaSlotStorage, perm: ()) -> Self
open spec fn from_repr_spec(r: MetaSlotStorage, perm: ()) -> Self
{
match r {
MetaSlotStorage::PTNode(node) => node.into_spec::<C>(),
_ => arbitrary(),
}
}Source§exec fn from_repr(r: MetaSlotStorage, Tracked(perm): Tracked<&()>) -> Self
exec fn from_repr(r: MetaSlotStorage, Tracked(perm): Tracked<&()>) -> Self
Source§exec fn from_borrowed<'a>(
r: &'a MetaSlotStorage,
verus_tmp_perm: Tracked<&'a ()>,
) -> &'a Self
exec fn from_borrowed<'a>( r: &'a MetaSlotStorage, verus_tmp_perm: Tracked<&'a ()>, ) -> &'a Self
Source§proof fn from_to_repr(self, perm: ())
proof fn from_to_repr(self, perm: ())
Source§proof fn to_from_repr(r: MetaSlotStorage, perm: ())
proof fn to_from_repr(r: MetaSlotStorage, perm: ())
Source§proof fn to_repr_wf(self, perm: ())
proof fn to_repr_wf(self, perm: ())
Auto Trait Implementations§
impl !Freeze for MetaSlotStorage
impl !RefUnwindSafe for MetaSlotStorage
impl Send for MetaSlotStorage
impl Sync for MetaSlotStorage
impl Unpin for MetaSlotStorage
impl UnwindSafe for MetaSlotStorage
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