pub struct SegmentOwner<M: AnyFrameMeta + ?Sized> {
pub perms: Seq<MetaPerm<M>>,
}Expand description
A SegmentOwner<M> holds the permission tokens for all frames in the
Segment<M> for verification purposes.
Fields§
§perms: Seq<MetaPerm<M>>The permissions for all frames in the segment, which must be well-formed and valid.
Trait Implementations§
Source§impl<M: AnyFrameMeta + ?Sized> Inv for SegmentOwner<M>
impl<M: AnyFrameMeta + ?Sized> Inv for SegmentOwner<M>
Source§open spec fn inv(self) -> bool
open spec fn inv(self) -> bool
{
&&& forall |i: int| {
0 <= i < self.perms.len() as int
==> {
&&& self.perms[i].addr() % PAGE_SIZE == 0
&&& self.perms[i].addr() < MAX_PADDR
&&& self.perms[i].wf(&self.perms[i].inner_perms)
&&& self.perms[i].is_init()
}
}
}The invariant of a Segment:
- the permissions are well-formed and valid;
- the physical addresses of the permissions are aligned and within bounds.
Auto Trait Implementations§
impl<M> Freeze for SegmentOwner<M>
impl<M> !RefUnwindSafe for SegmentOwner<M>
impl<M> Send for SegmentOwner<M>where
M: Send,
impl<M> Sync for SegmentOwner<M>where
M: Sync,
impl<M> Unpin for SegmentOwner<M>where
M: Unpin,
impl<M> UnwindSafe for SegmentOwner<M>where
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