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;
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>;
}
pub trait Source<C> {
type Backend: io::Close<State = Self::Closing> + shutdown::Shutdown;
type Closing: io::Retry;
}
pub trait Storage<C, P: Copy, R: Copy>: Removal {
type Cleanup: memory::Cleanup<P>;
type Release: memory::Cleanup<(R, Self::Slot)>;
}
pub trait Removal {
type Slot: Copy + Eq;
}