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
sourcepub fn clone(&self) -> VMExternRef
pub 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
sourcepub fn from(other: ExternRef) -> VMExternRef
pub fn from(other: ExternRef) -> VMExternRef
Performs the conversion.
sourceimpl NativeWasmType for VMExternRef
impl NativeWasmType for VMExternRef
type Abi = VMExternRef
type Abi = VMExternRef
The ABI for this type (i32, i64, f32, f64)
pub fn from_abi(abi: <VMExternRef as NativeWasmType>::Abi) -> VMExternRef
pub fn into_abi(self) -> <VMExternRef as NativeWasmType>::Abi
sourcepub fn from_binary(bits: i128) -> VMExternRef
pub 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
sourcepub fn eq(&self, other: &VMExternRef) -> bool
pub fn eq(&self, other: &VMExternRef) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcepub fn ne(&self, other: &VMExternRef) -> bool
pub 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.
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
pub 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 · sourcepub fn borrow_mut(&mut self) -> &mut T
pub 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,
pub fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
pub 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,
sourcepub fn equivalent(&self, key: &K) -> bool
pub fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more