pub trait Pool: Sized {
type Layout: Layout;
type Buffer: Buffer + Recycle<Deferred = Infallible>;
type Context: Context<Layout = Self::Layout> + Fixed<Self::Buffer>;
// Required methods
fn try_new(
layout: Self::Layout,
) -> Result<(Self, Self::Context), CreateError>;
fn take(&self) -> Option<Self::Buffer>;
}Expand description
A native receive pool paired with its exact projection context.
Required Associated Types§
type Layout: Layout
type Buffer: Buffer + Recycle<Deferred = Infallible>
type Context: Context<Layout = Self::Layout> + Fixed<Self::Buffer>
Required Methods§
fn try_new(layout: Self::Layout) -> Result<(Self, Self::Context), CreateError>
fn take(&self) -> Option<Self::Buffer>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".