pub struct RetainedHostMemoryRegion { /* private fields */ }Expand description
An owned, bounds-checked subregion of stable host memory.
Implementations§
Source§impl RetainedHostMemoryRegion
impl RetainedHostMemoryRegion
pub fn new<T>(
owner: Arc<T>,
offset_bytes: usize,
length_bytes: usize,
) -> Result<Self, VNextError>where
T: StableHostMemory,
pub fn bytes(&self) -> &[u8] ⓘ
Sourcepub fn owner_bytes(&self) -> &[u8] ⓘ
pub fn owner_bytes(&self) -> &[u8] ⓘ
Entire stable allocation. Backends use this only to prove that a
page-aligned native view enclosing Self::bytes remains within the
retained owner.
pub const fn offset_bytes(&self) -> usize
pub const fn length_bytes(&self) -> usize
Trait Implementations§
Source§impl Clone for RetainedHostMemoryRegion
impl Clone for RetainedHostMemoryRegion
Source§fn clone(&self) -> RetainedHostMemoryRegion
fn clone(&self) -> RetainedHostMemoryRegion
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for RetainedHostMemoryRegion
impl !UnwindSafe for RetainedHostMemoryRegion
impl Freeze for RetainedHostMemoryRegion
impl Send for RetainedHostMemoryRegion
impl Sync for RetainedHostMemoryRegion
impl Unpin for RetainedHostMemoryRegion
impl UnsafeUnpin for RetainedHostMemoryRegion
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