dope_sys/engine/admit/
reserve.rs1use crate::{
2 engine::admit::{Context, Error, Native, Submission},
3 io::request,
4};
5
6type Failure<C> = Error<<<C as Context>::Native as Native>::Error<<C as Context>::Failure>>;
7
8pub trait Reserve<'a, C: Context, B: 'a>: Submission {
13 fn try_new(backend: &'a mut B, key: C::Key, pending: bool) -> Result<Self, Failure<C>>;
14
15 fn try_at(
18 backend: &'a mut B,
19 key: C::Key,
20 pending: bool,
21 _slot: &<C::Inputs as request::Context>::Target,
22 ) -> Result<Self, Failure<C>> {
23 Self::try_new(backend, key, pending)
24 }
25}