pub trait PageSegmentOps {
// Required methods
fn page(&self) -> &[u8];
fn page_mut(&mut self) -> &mut [u8];
fn page_address(&self) -> u64;
fn set_page_address(&mut self, address: u64);
}Expand description
An import/export segment that stores an inner VM page and its address.
The page is stored in the first 4096 bytes, the address is encoded using little-endian format in the last 8 bytes of the segment.
[ page(4096) | address(8) ]
Required Methods§
Sourcefn page_mut(&mut self) -> &mut [u8]
fn page_mut(&mut self) -> &mut [u8]
Get mutable reference to the page contents (excluding the address).
Sourcefn page_address(&self) -> u64
fn page_address(&self) -> u64
Get the address.
Sourcefn set_page_address(&mut self, address: u64)
fn set_page_address(&mut self, address: u64)
Set the address.