pub struct Area { /* private fields */ }Expand description
A pointer to a region in memory.
Implementations§
Source§impl Area
impl Area
Sourcepub fn new(start: Address, item_size: usize, item_count: usize) -> Self
pub fn new(start: Address, item_size: usize, item_count: usize) -> Self
Creates a new area with specified item size (how many 64 bits values describes one element of the area).
Sourcepub fn from(start: Address, end: Address) -> Self
pub fn from(start: Address, end: Address) -> Self
Returns an area enclosing the specified addresses.
Sourcepub fn constraint(&self, pointer: Address) -> Address
pub fn constraint(&self, pointer: Address) -> Address
Bounds the specified address inside the area, so it is always a valid pointer to this area.
Sourcepub fn next_address(&self, cursor: Address) -> Address
pub fn next_address(&self, cursor: Address) -> Address
Returns the next constrained address following cursor.
Trait Implementations§
Source§impl Identifier for Area
impl Identifier for Area
impl Copy for Area
impl Eq for Area
impl StructuralPartialEq for Area
Auto Trait Implementations§
impl Freeze for Area
impl RefUnwindSafe for Area
impl Send for Area
impl Sync for Area
impl Unpin for Area
impl UnwindSafe for Area
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