pub enum WeakOrStrongInstanceRef {
Weak(WeakInstanceRef),
Strong(InstanceRef),
}
Expand description
An InstanceRef
that may or may not be keeping the Instance
alive.
This type is useful for types that conditionally must keep / not keep the
underlying Instance
alive. For example, to prevent cycles in WasmerEnv
s.
Variants
Weak(WeakInstanceRef)
A weak instance ref.
Strong(InstanceRef)
A strong instance ref.
Implementations
Trait Implementations
sourceimpl Clone for WeakOrStrongInstanceRef
impl Clone for WeakOrStrongInstanceRef
sourcefn clone(&self) -> WeakOrStrongInstanceRef
fn clone(&self) -> WeakOrStrongInstanceRef
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 WeakOrStrongInstanceRef
impl Debug for WeakOrStrongInstanceRef
sourceimpl MemoryUsage for WeakOrStrongInstanceRef
impl MemoryUsage for WeakOrStrongInstanceRef
sourcefn size_of_val(&self, visited: &mut dyn MemoryUsageTracker) -> usize
fn size_of_val(&self, visited: &mut dyn MemoryUsageTracker) -> usize
Returns the size of the referenced value in bytes. Read more
sourceimpl PartialEq<WeakOrStrongInstanceRef> for WeakOrStrongInstanceRef
impl PartialEq<WeakOrStrongInstanceRef> for WeakOrStrongInstanceRef
sourcefn eq(&self, other: &WeakOrStrongInstanceRef) -> bool
fn eq(&self, other: &WeakOrStrongInstanceRef) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &WeakOrStrongInstanceRef) -> bool
fn ne(&self, other: &WeakOrStrongInstanceRef) -> bool
This method tests for !=
.
impl StructuralPartialEq for WeakOrStrongInstanceRef
Auto Trait Implementations
impl !RefUnwindSafe for WeakOrStrongInstanceRef
impl Send for WeakOrStrongInstanceRef
impl Sync for WeakOrStrongInstanceRef
impl Unpin for WeakOrStrongInstanceRef
impl !UnwindSafe for WeakOrStrongInstanceRef
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<T> Upcastable for T where
T: 'static + Any + Send + Sync,
impl<T> Upcastable for T where
T: 'static + Any + Send + Sync,
sourcefn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
sourcefn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref