Skip to main content

AnyFrameMeta

Trait AnyFrameMeta 

Source
pub unsafe trait AnyFrameMeta {
    // Required method
    spec fn vtable_ptr(&self) -> usize
       where Self: Sized;

    // Provided methods
    open spec fn on_drop_pre(
        &self,
        reader: VmReader<'_, Infallible>,
        regions: MetaRegionOwners,
        vm_io_owner: VmIoOwner,
    ) -> bool { ... }
    fn on_drop(
        &mut self,
        _reader: &mut VmReader<'_, Infallible>,
        verus_tmp__regions: Tracked<&mut MetaRegionOwners>,
        verus_tmp__vm_io_owner: Tracked<&mut VmIoOwner>,
    ) { ... }
    fn is_untyped(&self) -> bool { ... }
}
Expand description

Space-holder of the AnyFrameMeta virtual table.

Dyn-compatible: no Self-by-value, no associated types on dispatched methods, no dyn-incompatible supertrait. vtable_ptr is Self: Sized because it’s only used statically (the runtime vtable pointer lives on the slot, not on the instance). Sites that need Repr<MetaSlotStorage> must spell it out — it was previously a supertrait.

Required Methods§

Source

spec fn vtable_ptr(&self) -> usize
where Self: Sized,

Provided Methods§

Source

open spec fn on_drop_pre( &self, reader: VmReader<'_, Infallible>, regions: MetaRegionOwners, vm_io_owner: VmIoOwner, ) -> bool

{ true }

Per-impl precondition for Self::on_drop. Default is true. Impls that need richer caller-side invariants (e.g. the PT-node’s reader/region invariants) override this; the trait method’s requires clause calls it.

Source

exec fn on_drop( &mut self, _reader: &mut VmReader<'_, Infallible>, verus_tmp__regions: Tracked<&mut MetaRegionOwners>, verus_tmp__vm_io_owner: Tracked<&mut VmIoOwner>, )

requires
old(_regions).inv(),
old(_reader).inv(),
old(_vm_io_owner).inv(),
old(_reader).wf(*old(_vm_io_owner)),
old(self).on_drop_pre(*old(_reader), *old(_regions), *old(_vm_io_owner)),
ensures
final(_regions).inv(),
final(_reader).inv(),
final(_vm_io_owner).inv(),
final(_reader).wf(*final(_vm_io_owner)),
Source

exec fn is_untyped(&self) -> bool

Implementors§

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.

Source§

impl<C: PageTableConfig> AnyFrameMeta for PageTablePageMeta<C>

Source§

impl<M: AnyFrameMeta + Repr<MetaSlotSmall>> AnyFrameMeta for Link<M>