Skip to main content

dope_sys/engine/
mod.rs

1use o3::buffer;
2
3use crate::{
4    io,
5    memory::{self, buffer::raw::Release},
6};
7
8pub mod admit;
9mod cancel;
10mod install;
11pub mod life;
12pub mod raw;
13pub mod register;
14pub mod ring;
15pub mod shutdown;
16pub use cancel::Cancel;
17pub use install::Install;
18
19/// Exact completed receive ownership and its original projection context.
20pub trait Buffer: Release<Self::Token> {
21    type Layout: memory::raw::Layout;
22    type Token;
23    type Context: memory::Context<Layout = Self::Layout> + buffer::raw::Fixed<Self::Token>;
24}
25
26/// Selects the native backend owner for its host's typed contracts.
27pub trait Source<C> {
28    type Backend: io::Close<State = Self::Closing> + shutdown::Shutdown;
29    type Closing: io::Retry;
30}
31
32/// Selects retained construction and fixed-file removal owners for one host.
33pub trait Storage<C, P: Copy, R: Copy>: Removal {
34    type Cleanup: memory::Cleanup<P>;
35    type Release: memory::Cleanup<(R, Self::Slot)>;
36}
37
38/// Selects the native fixed-file target retained by a failed removal.
39pub trait Removal {
40    type Slot: Copy + Eq;
41}