Struct extism_pdk::MemoryHandle
source · pub struct MemoryHandle {
pub offset: u64,
pub length: u64,
}
Expand description
MemoryHandle
describes where in memory a block of data is stored
Fields§
§offset: u64
The offset of the region in Extism linear memory
length: u64
The length of the memory region
Implementations§
source§impl MemoryHandle
impl MemoryHandle
sourcepub unsafe fn new(offset: u64, length: u64) -> MemoryHandle
pub unsafe fn new(offset: u64, length: u64) -> MemoryHandle
Create a new MemoryHandle
from an offset in memory and length
§Safety
This function is unsafe because the specified memory region may not be valid.
sourcepub fn null() -> MemoryHandle
pub fn null() -> MemoryHandle
NULL
equivalent
Trait Implementations§
source§impl Clone for MemoryHandle
impl Clone for MemoryHandle
source§fn clone(&self) -> MemoryHandle
fn clone(&self) -> MemoryHandle
Returns a copy 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 MemoryHandle
impl Debug for MemoryHandle
source§impl Ord for MemoryHandle
impl Ord for MemoryHandle
source§fn cmp(&self, other: &MemoryHandle) -> Ordering
fn cmp(&self, other: &MemoryHandle) -> 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 MemoryHandle
impl PartialEq for MemoryHandle
source§impl PartialOrd for MemoryHandle
impl PartialOrd for MemoryHandle
impl Copy for MemoryHandle
impl Eq for MemoryHandle
impl StructuralPartialEq for MemoryHandle
Auto Trait Implementations§
impl Freeze for MemoryHandle
impl RefUnwindSafe for MemoryHandle
impl Send for MemoryHandle
impl Sync for MemoryHandle
impl Unpin for MemoryHandle
impl UnwindSafe for MemoryHandle
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)