pub struct RefCountingSmallDictionary<TKey> { /* private fields */ }Expand description
Counts the references to keys in an InlineDictionary.
Implementations§
Source§impl<TKey: Clone + Eq + Hash> RefCountingSmallDictionary<TKey>
impl<TKey: Clone + Eq + Hash> RefCountingSmallDictionary<TKey>
Sourcepub fn add(&mut self, key: TKey) -> bool
pub fn add(&mut self, key: TKey) -> bool
Adds a reference to the key. Returns whether it is the first one.
Sourcepub fn remove(&mut self, key: &TKey) -> bool
pub fn remove(&mut self, key: &TKey) -> bool
Removes a reference to the key. Returns whether it was the last one.
Panics when the key has no reference.
pub fn get_enumerator(&self) -> InlineDictionaryEnumerator<'_, TKey, i32> ⓘ
Trait Implementations§
Source§impl<'a, TKey: Clone + Eq + Hash> IntoIterator for &'a RefCountingSmallDictionary<TKey>
impl<'a, TKey: Clone + Eq + Hash> IntoIterator for &'a RefCountingSmallDictionary<TKey>
Auto Trait Implementations§
impl<TKey> Freeze for RefCountingSmallDictionary<TKey>
impl<TKey> RefUnwindSafe for RefCountingSmallDictionary<TKey>
impl<TKey> Send for RefCountingSmallDictionary<TKey>
impl<TKey> Sync for RefCountingSmallDictionary<TKey>
impl<TKey> Unpin for RefCountingSmallDictionary<TKey>
impl<TKey> UnsafeUnpin for RefCountingSmallDictionary<TKey>
impl<TKey> UnwindSafe for RefCountingSmallDictionary<TKey>
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> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more