pub trait ObjectPool: Sized {
    type Data: 'static;

    // Provided methods
    fn request() -> Option<Object<Self>> { ... }
    fn manage(block: &'static mut ObjectBlock<Self::Data>) { ... }
}
Available on arm_llsc or x86 only.
Expand description

A singleton that manages pool::object::Objects

Required Associated Types§

source

type Data: 'static

The data type of the objects managed by the object pool

Provided Methods§

source

fn request() -> Option<Object<Self>>

Request a new object from the pool

source

fn manage(block: &'static mut ObjectBlock<Self::Data>)

Adds a statically allocate object to the pool

Object Safety§

This trait is not object safe.

Implementors§