pub struct WeakMap<K: Trace + ?Sized + 'static, V: Trace + 'static> { /* private fields */ }Expand description
A map that holds weak references to its keys and is traced by the garbage collector.
Implementations§
Source§impl<K: Trace + ?Sized, V: Trace> WeakMap<K, V>
impl<K: Trace + ?Sized, V: Trace> WeakMap<K, V>
Trait Implementations§
Source§impl<K: Clone + Trace + ?Sized + 'static, V: Clone + Trace + 'static> Clone for WeakMap<K, V>
impl<K: Clone + Trace + ?Sized + 'static, V: Clone + Trace + 'static> Clone for WeakMap<K, V>
Source§impl<K: Debug + Trace + ?Sized + 'static, V: Debug + Trace + 'static> Debug for WeakMap<K, V>
impl<K: Debug + Trace + ?Sized + 'static, V: Debug + Trace + 'static> Debug for WeakMap<K, V>
Source§impl<K: Default + Trace + ?Sized + 'static, V: Default + Trace + 'static> Default for WeakMap<K, V>
impl<K: Default + Trace + ?Sized + 'static, V: Default + Trace + 'static> Default for WeakMap<K, V>
Source§impl<K: Trace + ?Sized + 'static, V: Trace + 'static> Trace for WeakMap<K, V>
impl<K: Trace + ?Sized + 'static, V: Trace + 'static> Trace for WeakMap<K, V>
Source§unsafe fn trace_non_roots(&self)
unsafe fn trace_non_roots(&self)
Trace handles located in GC heap, and mark them as non root. Read more
Source§fn run_finalizer(&self)
fn run_finalizer(&self)
Runs
Finalize::finalize on this object and all
contained subobjects.Auto Trait Implementations§
impl<K, V> !RefUnwindSafe for WeakMap<K, V>
impl<K, V> !Send for WeakMap<K, V>
impl<K, V> !Sync for WeakMap<K, V>
impl<K, V> !UnwindSafe for WeakMap<K, V>
impl<K, V> Freeze for WeakMap<K, V>
impl<K, V> Unpin for WeakMap<K, V>
impl<K, V> UnsafeUnpin for WeakMap<K, V>
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more