Trait mfio_rt::test_suite::IoBackendExt
source · pub trait IoBackendExt<Handle>: IoBackend<Handle>where
Handle: Pollable,{
// Provided methods
fn with_backend<F>(
&self,
future: F
) -> (WithBackend<'_, Self::Backend, F>, Option<PollingHandle<'_>>)
where F: Future { ... }
fn block_on<F>(&self, fut: F) -> <F as Future>::Output
where F: Future { ... }
}
Available on crate feature
test_suite
only.Expand description
Helpers for IoBackend
.
Provided Methods§
sourcefn with_backend<F>(
&self,
future: F
) -> (WithBackend<'_, Self::Backend, F>, Option<PollingHandle<'_>>)where
F: Future,
fn with_backend<F>(
&self,
future: F
) -> (WithBackend<'_, Self::Backend, F>, Option<PollingHandle<'_>>)where
F: Future,
Builds a composite future that also polls the backend future.
If second tuple element is not None
, then the caller is responsible for registering and
handling read-readiness events.
Object Safety§
This trait is not object safe.