Skip to main content

dope_sys/engine/ring/
config.rs

1use std::num;
2
3use o3::{base::num::bounded, depot};
4
5use crate::{engine::ring::Context, table::permit};
6
7/// Construction inputs retain nonzero queue counts and the fixed-file ABI bound.
8pub struct Build<L> {
9    pub submit: num::NonZero<u32>,
10    pub complete: num::NonZero<u32>,
11    pub defer: bool,
12    pub files: bounded::U32<1, { 1 << 24 }>,
13    pub range: Option<bounded::U32<1, { 1 << 24 }>>,
14    pub receive: L,
15}
16
17/// Projects validated host settings before native construction begins.
18pub trait Config<G>: Context {
19    type Key: permit::raw::Key;
20    type Index: depot::raw::Compact;
21
22    fn config(config: &G) -> Build<Self::Layout>;
23}