pub trait ObjectPool: Sized {
type Data: 'static;
// Provided methods
fn request() -> Option<Object<Self>> { ... }
fn manage(block: &'static mut ObjectBlock<Self::Data>) { ... }
}
Expand description
A singleton that manages pool::object::Object
s
Required Associated Types§
Provided Methods§
Sourcefn manage(block: &'static mut ObjectBlock<Self::Data>)
fn manage(block: &'static mut ObjectBlock<Self::Data>)
Adds a statically allocate object to the pool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.