pub trait PoolableOps:
Poolable
+ Sized
+ Sealed {
// Required methods
fn alloc() -> Option<PoolRef<MaybeUninit<Self>>>;
fn free(ptr: &mut PoolRef<Self>);
}
Expand description
A trait with operations for types that can be stored in a pool.
Required Methods§
Sourcefn alloc() -> Option<PoolRef<MaybeUninit<Self>>>
fn alloc() -> Option<PoolRef<MaybeUninit<Self>>>
Allocates memory for Self
. The resulting value must be initialized before use.
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.