FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ListPool

    struct · ferroui-base · v0.5.0

    struct ListPool<T>
    

    A pool of reusable lists.

    View source

    Members

    rent

    fn rent(self: &Self) -> RentedList<T>
    

    Takes an empty list out of the pool.

    Source

    return_list

    fn return_list(self: &Self, rented_list: RentedList<T>)
    

    Gives a list back to the pool. The items are dropped; the storage is kept.

    Source

    return_optional

    fn return_optional(self: &Self, rented_list: Option<RentedList<T>>)
    

    Gives an optional list back to the pool (upstream accepts null).

    Source

    verify_all_returned

    fn verify_all_returned(self: &Self)
    

    Checks (in debug builds) that every rented list was returned.

    Source

    Trait implementations

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

    Availability

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