RefTrackingDictionary
struct · ferroui-base · v0.5.0
struct RefTrackingDictionary<TKey>
Maintains a set of objects with reference counts
Members
new
fn new() -> Self
add_ref
fn add_ref(self: &mut Self, key: TKey) -> bool
Increase reference count for a key by 1.
Returns true if key was added to the dictionary, false otherwise.
release_ref
fn release_ref(self: &mut Self, key: &TKey) -> bool
Decrease reference count for a key by 1.
Returns true if key was removed to the dictionary, false otherwise. A key without a reference panics in a debug build and returns false otherwise.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyErasedDestructorIntoEitherDefaultDerefDerefMut
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.