FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ThreadSafeObjectPool

    struct · ferroui-base · v0.5.0

    struct ThreadSafeObjectPool<T>
    

    A pool of reusable objects that can be shared between threads.

    View source

    Members

    new

    fn new() -> Self
    

    Source

    get

    fn get(self: &Self) -> T
    

    Takes an object out of the pool, creating one when the pool is empty.

    Source

    return_and_set_null

    fn return_and_set_null(self: &Self, obj: &mut Option<T>)
    

    Puts the object back into the pool and clears the slot it came from.

    Source

    default_pool

    fn default_pool() -> Arc<ThreadSafeObjectPool<T>>
    

    The process-wide pool for T.

    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
    • Default

    Availability

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