FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    RefTrackingDictionary

    struct · ferroui-base · v0.5.0

    struct RefTrackingDictionary<TKey>
    

    Maintains a set of objects with reference counts

    View source

    Members

    new

    fn new() -> Self
    

    Source

    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.

    Source

    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.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Receiver
    • Any
    • ErasedDestructor
    • IntoEither
    • Default
    • Deref
    • DerefMut

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.