[−][src]Struct wasmer_runtime_core::memory::ptr::WasmPtr
A pointer to a Wasm item.
Methods
impl<T: Copy, Ty> WasmPtr<T, Ty>[src]
pub fn new(offset: u32) -> Self[src]
Create a new WasmPtr at the given offset.
pub fn offset(self) -> u32[src]
Get the offset for this WasmPtr.
impl<T: Copy + ValueType> WasmPtr<T, Item>[src]
pub fn deref<'a>(self, memory: &'a Memory) -> Option<&'a Cell<T>>[src]
Dereference this WasmPtr.
pub unsafe fn deref_mut<'a>(self, memory: &'a Memory) -> Option<&'a mut Cell<T>>[src]
Mutable dereference this WasmPtr.
impl<T: Copy + ValueType> WasmPtr<T, Array>[src]
pub fn deref<'a>(
self,
memory: &'a Memory,
index: u32,
length: u32
) -> Option<&'a [Cell<T>]>[src]
self,
memory: &'a Memory,
index: u32,
length: u32
) -> Option<&'a [Cell<T>]>
Dereference this WasmPtr.
pub unsafe fn deref_mut<'a>(
self,
memory: &'a Memory,
index: u32,
length: u32
) -> Option<&'a mut [Cell<T>]>[src]
self,
memory: &'a Memory,
index: u32,
length: u32
) -> Option<&'a mut [Cell<T>]>
Mutable dereference this WasmPtr.
pub fn get_utf8_string<'a>(
self,
memory: &'a Memory,
str_len: u32
) -> Option<&'a str>[src]
self,
memory: &'a Memory,
str_len: u32
) -> Option<&'a str>
Get a UTF-8 string representation of this WasmPtr with the given length.
Trait Implementations
impl<T: Copy, Ty> Clone for WasmPtr<T, Ty>[src]
fn clone(&self) -> Self[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<T: Copy, Ty> Copy for WasmPtr<T, Ty>[src]
impl<T: Copy, Ty> Debug for WasmPtr<T, Ty>[src]
impl<T: Copy, Ty> Eq for WasmPtr<T, Ty>[src]
impl<T: Copy, Ty> PartialEq<WasmPtr<T, Ty>> for WasmPtr<T, Ty>[src]
impl<T: Copy, Ty> ValueType for WasmPtr<T, Ty>[src]
impl<T: Copy, Ty> WasmExternType for WasmPtr<T, Ty>[src]
Auto Trait Implementations
impl<T, Ty> RefUnwindSafe for WasmPtr<T, Ty> where
T: RefUnwindSafe,
Ty: RefUnwindSafe,
T: RefUnwindSafe,
Ty: RefUnwindSafe,
impl<T, Ty> Send for WasmPtr<T, Ty> where
T: Send,
Ty: Send,
T: Send,
Ty: Send,
impl<T, Ty> Sync for WasmPtr<T, Ty> where
T: Sync,
Ty: Sync,
T: Sync,
Ty: Sync,
impl<T, Ty> Unpin for WasmPtr<T, Ty> where
T: Unpin,
Ty: Unpin,
T: Unpin,
Ty: Unpin,
impl<T, Ty> UnwindSafe for WasmPtr<T, Ty> where
T: UnwindSafe,
Ty: UnwindSafe,
T: UnwindSafe,
Ty: UnwindSafe,
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<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized, [src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool[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> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<Rets> TrapEarly<Rets> for Rets where
Rets: WasmTypeList, [src]
Rets: WasmTypeList,
type Error = Infallible
The error type for this trait.
fn report(Self) -> Result<Rets, Infallible>[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<A> WasmTypeList for A where
A: WasmExternType, [src]
A: WasmExternType,
type CStruct = S1<A>
CStruct type.
type RetArray = [u64; 1]
Array of return values.
fn from_ret_array(<A as WasmTypeList>::RetArray) -> A[src]
fn empty_ret_array() -> <A as WasmTypeList>::RetArray[src]
fn from_c_struct(<A as WasmTypeList>::CStruct) -> A[src]
fn into_c_struct(Self) -> <A as WasmTypeList>::CStruct[src]
fn types() -> &'static [Type][src]
unsafe fn call<Rets>(
Self,
NonNull<Func>,
Wasm,
*mut Ctx
) -> Result<Rets, RuntimeError> where
Rets: WasmTypeList, [src]
Self,
NonNull<Func>,
Wasm,
*mut Ctx
) -> Result<Rets, RuntimeError> where
Rets: WasmTypeList,