[−][src]Struct holochain_wasmer_host::AllocationPtr
AllocationPtr wraps a ptr that is used to pass the location of an Allocation
between the host and guest (in either direction).
The AllocationPtr intentionally does not implement Clone
The From
Methods
impl AllocationPtr
[src]
pub fn as_remote_ptr(&self) -> u64
[src]
normally we don't want to expose the inner Ptr because cloning or reusing it
can lead to bad allocation and deallocation
in the case that we pass the inner Ptr over to the host we do need to access it
this function is just like From
pub fn from_remote_ptr(host_ptr: u64) -> AllocationPtr
[src]
pub fn peek_allocation(&self) -> [u64; 2]
[src]
get the Allocation for this Allocation without deallocating the Allocation in the process
usually you do not want to do this because From
Trait Implementations
impl From<[u64; 2]> for AllocationPtr
[src]
given an Allocation returns a u64 pointer to it
the Allocation (slice) is internally converted to a Vec
impl From<AllocationPtr> for SerializedBytes
[src]
fn from(allocation_ptr: AllocationPtr) -> SerializedBytes
[src]
impl From<SerializedBytes> for AllocationPtr
[src]
fn from(sb: SerializedBytes) -> AllocationPtr
[src]
Auto Trait Implementations
impl RefUnwindSafe for AllocationPtr
impl Send for AllocationPtr
impl Sync for AllocationPtr
impl Unpin for AllocationPtr
impl UnwindSafe for AllocationPtr
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,