dope-sys 0.75.0

Typed operating-system call contracts
Documentation
use o3::buffer;

use crate::{
    io,
    memory::{self, buffer::raw::Release},
};

pub mod admit;
mod cancel;
mod install;
pub mod life;
pub mod raw;
pub mod register;
pub mod ring;
pub mod shutdown;
pub use cancel::Cancel;
pub use install::Install;

/// Exact completed receive ownership and its original projection context.
pub trait Buffer: Release<Self::Token> {
    type Layout: memory::raw::Layout;
    type Token;
    type Context: memory::Context<Layout = Self::Layout> + buffer::raw::Fixed<Self::Token>;
}

/// Selects the native backend owner for its host's typed contracts.
pub trait Source<C> {
    type Backend: io::Close<State = Self::Closing> + shutdown::Shutdown;
    type Closing: io::Retry;
}

/// Selects retained construction and fixed-file removal owners for one host.
pub trait Storage<C, P: Copy, R: Copy>: Removal {
    type Cleanup: memory::Cleanup<P>;
    type Release: memory::Cleanup<(R, Self::Slot)>;
}

/// Selects the native fixed-file target retained by a failed removal.
pub trait Removal {
    type Slot: Copy + Eq;
}