ListPool
struct · ferroui-base · v0.5.0
struct ListPool<T>
A pool of reusable lists.
Members
rent
fn rent(self: &Self) -> RentedList<T>
Takes an empty list out of the pool.
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.
return_optional
fn return_optional(self: &Self, rented_list: Option<RentedList<T>>)
Gives an optional list back to the pool (upstream accepts null).
verify_all_returned
fn verify_all_returned(self: &Self)
Checks (in debug builds) that every rented list was returned.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEither
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.