pub struct MemoryRegion { /* private fields */ }Expand description
The information of initial memory regions that are needed by the kernel. The sections are not guaranteed to not overlap. The region must be page aligned.
Implementations§
Source§impl MemoryRegion
impl MemoryRegion
Sourcepub const exec fn new(base: Paddr, len: usize, typ: MemoryRegionType) -> ret : Self
pub const exec fn new(base: Paddr, len: usize, typ: MemoryRegionType) -> ret : Self
requires
base + len <= MAX_PADDR(),ensuresret.inv(),ret@
== (MemRegionModel {
base: base as int,
end: base + len,
typ: typ.to_int(),
}),Constructs a valid memory region.
Sourcepub const exec fn VERUS_UNERASED_PROXY__new(
base: Paddr,
len: usize,
typ: MemoryRegionType,
) -> ret : Self
pub const exec fn VERUS_UNERASED_PROXY__new( base: Paddr, len: usize, typ: MemoryRegionType, ) -> ret : Self
requires
base + len <= MAX_PADDR(),ensuresret.inv(),ret@
== (MemRegionModel {
base: base as int,
end: base + len,
typ: typ.to_int(),
}),Constructs a valid memory region.
Sourcepub const exec fn bad() -> ret : Self
pub const exec fn bad() -> ret : Self
ensures
ret.inv(),ret@ == MemRegionModel::bad(),Constructs a bad memory region.
Sourcepub const exec fn VERUS_UNERASED_PROXY__bad() -> ret : Self
pub const exec fn VERUS_UNERASED_PROXY__bad() -> ret : Self
ensures
ret.inv(),ret@ == MemRegionModel::bad(),Constructs a bad memory region.
pub fn __VERUS_SPEC_base(&self) -> Paddr
pub fn __VERUS_SPEC_len(&self) -> usize
Sourcepub exec fn end(&self) -> Paddr
pub exec fn end(&self) -> Paddr
requires
self.inv(),The physical address of the end of the region.
pub fn __VERUS_SPEC_end(&self) -> Paddr
pub fn __VERUS_SPEC_is_empty(&self) -> bool
Sourcepub fn typ(&self) -> MemoryRegionType
pub fn typ(&self) -> MemoryRegionType
The type of the region.
pub fn __VERUS_SPEC_typ(&self) -> MemoryRegionType
Trait Implementations§
Source§impl Clone for MemoryRegion
impl Clone for MemoryRegion
Source§fn clone(&self) -> MemoryRegion
fn clone(&self) -> MemoryRegion
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MemoryRegion
impl Debug for MemoryRegion
Source§impl InvView for MemoryRegion
impl InvView for MemoryRegion
Source§proof fn view_preserves_inv(self)
proof fn view_preserves_inv(self)
Source§impl Ord for MemoryRegion
impl Ord for MemoryRegion
Source§fn cmp(&self, other: &MemoryRegion) -> Ordering
fn cmp(&self, other: &MemoryRegion) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for MemoryRegion
impl PartialEq for MemoryRegion
Source§impl PartialOrd for MemoryRegion
impl PartialOrd for MemoryRegion
Source§impl View for MemoryRegion
impl View for MemoryRegion
impl Copy for MemoryRegion
impl Eq for MemoryRegion
impl StructuralPartialEq for MemoryRegion
Auto Trait Implementations§
impl Freeze for MemoryRegion
impl RefUnwindSafe for MemoryRegion
impl Send for MemoryRegion
impl Sync for MemoryRegion
impl Unpin for MemoryRegion
impl UnwindSafe for MemoryRegion
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