UniqueFrameOwner

Struct UniqueFrameOwner 

Source
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: usize

Implementations§

Source§

impl<M: AnyFrameMeta + Repr<MetaSlot> + OwnerOf> UniqueFrameOwner<M>

Source

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()

}
Source

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])

}
Source

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>>

{
    &&& 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>

Source§

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>

Source§

impl<M: AnyFrameMeta + Repr<MetaSlot> + OwnerOf> View for UniqueFrameOwner<M>

Source§

open spec fn view(&self) -> Self::V

{
    UniqueFrameModel {
        meta: self.meta_own@,
    }
}
Source§

type V = UniqueFrameModel<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>
where <M as OwnerOf>::Owner: Send, M: Send,

§

impl<M> Sync for UniqueFrameOwner<M>
where <M as OwnerOf>::Owner: Sync, M: Sync,

§

impl<M> Unpin for UniqueFrameOwner<M>
where <M as OwnerOf>::Owner: Unpin, M: Unpin,

§

impl<M> UnwindSafe for UniqueFrameOwner<M>
where <M as OwnerOf>::Owner: UnwindSafe, M: UnwindSafe,

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.

§

impl<T, VERUS_SPEC__A> FromSpec<T> for VERUS_SPEC__A
where VERUS_SPEC__A: From<T>,

§

fn obeys_from_spec() -> bool

§

fn from_spec(v: T) -> VERUS_SPEC__A

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.

§

impl<T, VERUS_SPEC__A> IntoSpec<T> for VERUS_SPEC__A
where VERUS_SPEC__A: Into<T>,

§

fn obeys_into_spec() -> bool

§

fn into_spec(self) -> T

§

impl<T, U> IntoSpecImpl<U> for T
where U: From<T>,

§

fn obeys_into_spec() -> bool

§

fn into_spec(self) -> U

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

impl<T, VERUS_SPEC__A> TryFromSpec<T> for VERUS_SPEC__A
where VERUS_SPEC__A: TryFrom<T>,

§

fn obeys_try_from_spec() -> bool

§

fn try_from_spec( v: T, ) -> Result<VERUS_SPEC__A, <VERUS_SPEC__A as TryFrom<T>>::Error>

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

impl<T, VERUS_SPEC__A> TryIntoSpec<T> for VERUS_SPEC__A
where VERUS_SPEC__A: TryInto<T>,

§

fn obeys_try_into_spec() -> bool

§

fn try_into_spec(self) -> Result<T, <VERUS_SPEC__A as TryInto<T>>::Error>

§

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

§

fn obeys_try_into_spec() -> bool

§

fn try_into_spec(self) -> Result<U, <U as TryFrom<T>>::Error>