pub struct FrameContents {
pub contents: Seq<MemContents<u8>>,
pub size: Ghost<usize>,
pub range: Ghost<Range<Paddr>>,
}Expand description
Byte contents of one physical frame range tracked in a MemView.
This is the physical-memory side of the model: each frame base Paddr maps
to a FrameContents value whose metadata (size, range) constrains how
contents can be interpreted.
Fields§
§contents: Seq<MemContents<u8>>Per-byte initialization/value state for this frame.
size: Ghost<usize>Frame size in bytes.
range: Ghost<Range<Paddr>>Physical range covered by this frame, modeled as [start, end).
Trait Implementations§
Source§impl Inv for FrameContents
impl Inv for FrameContents
Source§open spec fn inv(self) -> bool
open spec fn inv(self) -> bool
{
&&& self.contents.len() == self.size@
&&& self.size@ == self.range@.end - self.range@.start
&&& self.range@.start % self.size@ == 0
&&& self.range@.end % self.size@ == 0
&&& self.range@.start <= self.range@.end < MAX_PADDR
}Well-formedness invariant for FrameContents.
§Invariant
contents.len() == size.size == range.end - range.start.range.startandrange.endare aligned tosize.rangeis ordered and remains belowMAX_PADDR.
Auto Trait Implementations§
impl Freeze for FrameContents
impl RefUnwindSafe for FrameContents
impl Send for FrameContents
impl Sync for FrameContents
impl Unpin for FrameContents
impl UnwindSafe for FrameContents
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