Skip to main content

dope_uring/driver/engine/raw/
resume.rs

1use dope_sys::{
2    engine::{self, life, ring},
3    probe::Stopped,
4    ring::Source,
5};
6
7use crate::{Engine, Uring, driver::tuning::Progress};
8
9impl<'a, C, R> engine::raw::Resume<'a, R> for Uring
10where
11    C: ring::Context + 'a,
12    C::Tuning: Progress<C::Token>,
13    R: life::Resume<Backend = Engine<C>> + 'a,
14{
15    unsafe fn try_resume(
16        resolver: R,
17    ) -> Result<R, Stopped<R, life::Error<<Self as Source>::Poll, R::Fault>>> {
18        // SAFETY: the caller retains the exact terminal source continuously
19        // through the next quiescence or destruction, including on failure.
20        unsafe { Engine::try_resume(resolver) }
21    }
22}