Skip to main content

Pool

Trait Pool 

Source
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§

Source

type Layout: Layout

Source

type Buffer: Buffer + Recycle<Deferred = Infallible>

Source

type Context: Context<Layout = Self::Layout> + Fixed<Self::Buffer>

Required Methods§

Source

fn try_new(layout: Self::Layout) -> Result<(Self, Self::Context), CreateError>

Source

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".

Implementors§