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§
Implementations§
Trait Implementations§
source§impl Clone for WeakOrStrongInstanceRef
impl Clone for WeakOrStrongInstanceRef
source§fn clone(&self) -> WeakOrStrongInstanceRef
fn clone(&self) -> WeakOrStrongInstanceRef
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for WeakOrStrongInstanceRef
impl Debug for WeakOrStrongInstanceRef
source§impl PartialEq for WeakOrStrongInstanceRef
impl PartialEq for WeakOrStrongInstanceRef
source§fn 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 ==
.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§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§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.
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more