[−][src]Struct sp_wasm_interface::Pointer
Type to represent a pointer in wasm at the host.
Implementations
impl<T: PointerType> Pointer<T>[src][−]
pub fn new(ptr: u32) -> Self[src][−]
Create a new instance of Self.
pub fn offset(self, offset: u32) -> Option<Self>[src][−]
Calculate the offset from this pointer.
offset is in units of T. So, 3 means 3 * mem::size_of::<T>() as offset to the pointer.
Returns an Option to respect that the pointer could probably overflow.
pub fn null() -> Self[src][−]
Create a null pointer.
pub fn cast<R: PointerType>(self) -> Pointer<R>[src][−]
Cast this pointer of type T to a pointer of type R.
Trait Implementations
impl<T: Clone + PointerType> Clone for Pointer<T>[src][+]
impl<T: Copy + PointerType> Copy for Pointer<T>[src]
impl<T: Debug + PointerType> Debug for Pointer<T>[src][+]
impl<T: Eq + PointerType> Eq for Pointer<T>[src]
impl<T: PointerType> From<Pointer<T>> for u32[src][+]
impl<T: PointerType> From<Pointer<T>> for u64[src][+]
impl<T: PointerType> From<Pointer<T>> for usize[src][+]
impl<T: PointerType> From<u32> for Pointer<T>[src][+]
impl<T: PointerType> IntoValue for Pointer<T>[src][+]
impl<T: PartialEq + PointerType> PartialEq<Pointer<T>> for Pointer<T>[src][+]
impl<T: PointerType> StructuralEq for Pointer<T>[src]
impl<T: PointerType> StructuralPartialEq for Pointer<T>[src]
impl<T: PointerType> TryFromValue for Pointer<T>[src][+]
Auto Trait Implementations
impl<T> RefUnwindSafe for Pointer<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Pointer<T> where
T: Send,
T: Send,
impl<T> Sync for Pointer<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Pointer<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Pointer<T> where
T: UnwindSafe,
T: 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,
impl<T> From<T> for T[src][+]
impl<T, U> Into<U> for T where
U: From<T>, [src][+]
U: From<T>,
impl<T> MaybeRefUnwindSafe for T where
T: RefUnwindSafe, [src]
T: RefUnwindSafe,
impl<T> ToOwned for T where
T: Clone, [src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src][+]
U: TryFrom<T>,