1use std::convert::Infallible;
4
5pub mod client;
6pub mod control;
7pub mod driver;
8pub mod executor;
9pub mod io;
10pub mod platform;
11pub mod signal;
12pub mod topology;
13
14pub use dope_sys::{self, Errno};
15use dope_sys::{
16 engine::{Removal, Source, Storage},
17 table::permit,
18};
19use driver::{
20 life::native::{Context, Receive, host::Host},
21 receive,
22 result::{IoOperation, Kernel},
23 schedule::ready::Stored,
24 storage::Failure,
25};
26pub use o3;
27
28type Engine = <Backend as Source<Host<Backend>>>::Backend;
29type Resources = <Backend as Storage<Context, Receive, Failure, (IoOperation, Kernel)>>::Cleanup;
30type Released = <Backend as Storage<Context, Receive, Failure, (IoOperation, Kernel)>>::Release;
31type RemoveSlot = <Backend as Removal>::Slot;
32type Permits = <Backend as permit::Source>::Queue<Stored, receive::Index>;
33use dope_sys::table::token::host;
34use driver::retained::flight::Arena;
35
36type Fault = <Arena as host::raw::Drain>::Fault;
37type Reported = <Arena as host::raw::Drain>::Reported;
38
39#[derive(Debug)]
41pub enum BranchError<A, B> {
42 First(A),
44 Second(B),
46}
47
48impl<A, B> From<Infallible> for BranchError<A, B> {
49 fn from(value: Infallible) -> Self {
50 match value {}
51 }
52}
53
54cfg_select! {
55 target_os = "linux" => {
56 pub use dope_uring::Backend;
57 }
58 target_os = "macos" => {
59 pub use dope_kqueue::Backend;
60 }
61}