pub trait BoxPool: Sized {
type Data: 'static;
// Provided methods
fn alloc(value: Self::Data) -> Result<Box<Self>, Self::Data> { ... }
fn manage(block: &'static mut BoxBlock<Self::Data>) { ... }
}
Expand description
A singleton that manages pool::boxed::Box
-es
§Usage
Do not implement this trait yourself; instead use the box_pool!
macro to create a type that
implements this trait.
§Semver guarantees
Implementing this trait is exempt from semver guarantees.
i.e. a new patch release is allowed to break downstream BoxPool
implementations.
Using the trait, e.g. in generic code, does fall under semver guarantees.
Required Associated Types§
Provided Methods§
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.