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
impl StructuralPartialEq for WeakOrStrongInstanceRef
Auto Trait Implementations§
impl Freeze for WeakOrStrongInstanceRef
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
Source§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