dope-sys 0.78.0

Typed operating-system call contracts
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use o3::buffer::{self, pool};

use crate::memory;

/// A native receive pool paired with its exact projection context.
pub trait Pool: Sized {
    type Layout: memory::raw::Layout;
    type Buffer: crate::Buffer;
    type Context: memory::Context<Layout = Self::Layout> + buffer::raw::Fixed<Self::Buffer>;

    fn try_new(layout: Self::Layout) -> Result<(Self, Self::Context), pool::CreateError>;
    fn take(&self) -> Option<Self::Buffer>;
}