Struct wasmer_vm::VMExternRef
source · [−]#[repr(transparent)]pub struct VMExternRef(_);
Expand description
This type does not do reference counting automatically, reference counting can be done with
Self::ref_clone
and Self::ref_drop
.
Implementations
sourceimpl VMExternRef
impl VMExternRef
sourcepub const fn null() -> VMExternRef
pub const fn null() -> VMExternRef
New null extern ref
sourcepub fn new<T>(value: T) -> VMExternRef where
T: 'static + Any + Send + Sync,
pub fn new<T>(value: T) -> VMExternRef where
T: 'static + Any + Send + Sync,
Make a new extern reference
sourcepub fn downcast<T>(&self) -> Option<&T> where
T: 'static + Any + Send + Sync,
pub fn downcast<T>(&self) -> Option<&T> where
T: 'static + Any + Send + Sync,
Try to downcast to the given value
sourcepub fn ref_inc_by(&self, val: usize)
pub fn ref_inc_by(&self, val: usize)
A low-level function to increment the strong-count a given number of times.
This is used as an optimization when implementing some low-level VM primitives.
If you’re using this type directly for whatever reason, you probably want
Self::ref_clone
instead.
sourcepub fn ref_clone(&self) -> VMExternRef
pub fn ref_clone(&self) -> VMExternRef
A deep copy of the reference, increments the strong count.
Trait Implementations
sourceimpl Clone for VMExternRef
impl Clone for VMExternRef
sourcefn clone(&self) -> VMExternRef
fn clone(&self) -> VMExternRef
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for VMExternRef
impl Debug for VMExternRef
sourceimpl From<ExternRef> for VMExternRef
impl From<ExternRef> for VMExternRef
sourcefn from(other: ExternRef) -> VMExternRef
fn from(other: ExternRef) -> VMExternRef
Converts to this type from the input type.
sourceimpl NativeWasmType for VMExternRef
impl NativeWasmType for VMExternRef
type Abi = VMExternRef
type Abi = VMExternRef
The ABI for this type (i32, i64, f32, f64)
sourcefn from_binary(bits: i128) -> VMExternRef
fn from_binary(bits: i128) -> VMExternRef
Convert to self from i128 binary representation.
sourcefn to_value<T>(self) -> Value<T> where
T: WasmValueType,
fn to_value<T>(self) -> Value<T> where
T: WasmValueType,
Convert self to a Value
.
sourceimpl PartialEq<VMExternRef> for VMExternRef
impl PartialEq<VMExternRef> for VMExternRef
sourcefn eq(&self, other: &VMExternRef) -> bool
fn eq(&self, other: &VMExternRef) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &VMExternRef) -> bool
fn ne(&self, other: &VMExternRef) -> bool
This method tests for !=
.
impl Copy for VMExternRef
impl Eq for VMExternRef
impl StructuralEq for VMExternRef
impl StructuralPartialEq for VMExternRef
Auto Trait Implementations
impl !RefUnwindSafe for VMExternRef
impl !Send for VMExternRef
impl !Sync for VMExternRef
impl Unpin for VMExternRef
impl !UnwindSafe for VMExternRef
Blanket Implementations
impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.