pub struct UniqueFrameOwner<M: AnyFrameMeta + Repr<MetaSlot> + OwnerOf> {
pub meta_own: M::Owner,
pub meta_perm: PointsTo<MetaSlot, M>,
pub slot_index: usize,
}Fields§
§meta_own: M::Owner§meta_perm: PointsTo<MetaSlot, M>§slot_index: usizeImplementations§
Source§impl<M: AnyFrameMeta + Repr<MetaSlot> + OwnerOf> UniqueFrameOwner<M>
impl<M: AnyFrameMeta + Repr<MetaSlot> + OwnerOf> UniqueFrameOwner<M>
Sourcepub open spec fn perm_inv(self, perm: PointsTo<MetaSlot>) -> bool
pub open spec fn perm_inv(self, perm: PointsTo<MetaSlot>) -> bool
{
&&& perm.is_init()
&&& perm.value().storage.addr() == self.meta_perm.addr()
&&& perm.value().storage.addr() == self.meta_perm.points_to.addr()
}Sourcepub open spec fn global_inv(self, regions: MetaRegionOwners) -> bool
pub open spec fn global_inv(self, regions: MetaRegionOwners) -> bool
{
&&& regions.slots.contains_key(self.slot_index)
==> self.perm_inv(regions.slots[self.slot_index])
&&& regions.dropped_slots.contains_key(self.slot_index)
==> self.perm_inv(regions.dropped_slots[self.slot_index])
}Sourcepub proof fn from_raw_owner(
owner: M::Owner,
index: Ghost<usize>,
perm: PointsTo<MetaSlot, M>,
) -> Self
pub proof fn from_raw_owner( owner: M::Owner, index: Ghost<usize>, perm: PointsTo<MetaSlot, M>, ) -> Self
Source§impl<M: AnyFrameMeta + Repr<MetaSlot>> UniqueFrameOwner<Link<M>>
impl<M: AnyFrameMeta + Repr<MetaSlot>> UniqueFrameOwner<Link<M>>
Sourcepub open spec fn frame_link_inv(&self) -> bool
pub open spec fn frame_link_inv(&self) -> bool
{
&&& self.meta_perm.value().prev is None
&&& self.meta_perm.value().next is None
&&& self.meta_own.paddr == self.meta_perm.addr()
}Trait Implementations§
Source§impl<M: AnyFrameMeta + Repr<MetaSlot> + OwnerOf> Inv for UniqueFrameOwner<M>
impl<M: AnyFrameMeta + Repr<MetaSlot> + OwnerOf> Inv for UniqueFrameOwner<M>
Source§open spec fn inv(self) -> bool
open spec fn inv(self) -> bool
{
&&& self.meta_perm.is_init()
&&& self.meta_perm.wf()
&&& self.slot_index == frame_to_index(meta_to_frame(self.meta_perm.addr()))
&&& self.slot_index < max_meta_slots()
&&& (self.slot_index - FRAME_METADATA_RANGE().start) as usize % META_SLOT_SIZE() == 0
&&& self.meta_perm.addr()
< FRAME_METADATA_RANGE().start + MAX_NR_PAGES() * META_SLOT_SIZE()
}Source§impl<M: AnyFrameMeta + Repr<MetaSlot> + OwnerOf> InvView for UniqueFrameOwner<M>
impl<M: AnyFrameMeta + Repr<MetaSlot> + OwnerOf> InvView for UniqueFrameOwner<M>
Source§proof fn view_preserves_inv(self)
proof fn view_preserves_inv(self)
Source§impl<M: AnyFrameMeta + Repr<MetaSlot> + OwnerOf> View for UniqueFrameOwner<M>
impl<M: AnyFrameMeta + Repr<MetaSlot> + OwnerOf> View for UniqueFrameOwner<M>
Auto Trait Implementations§
impl<M> Freeze for UniqueFrameOwner<M>where
<M as OwnerOf>::Owner: Freeze,
impl<M> !RefUnwindSafe for UniqueFrameOwner<M>
impl<M> Send for UniqueFrameOwner<M>
impl<M> Sync for UniqueFrameOwner<M>
impl<M> Unpin for UniqueFrameOwner<M>
impl<M> UnwindSafe for UniqueFrameOwner<M>where
<M as OwnerOf>::Owner: UnwindSafe,
M: UnwindSafe,
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