macro_rules! derive_deftly_template_SomeMockRuntime {
({ $($driver:tt)* } [$($aoptions:tt)*] ($($future:tt)*) $($tpassthrough:tt)*) => { ... };
($($wrong:tt)*) => { ... };
}Expand description
Implements Runtime for a struct made of multiple sub-providers
The type must be a struct containing
field(s) which implement SleepProvider, NetProvider, etc.
The corresponding fields must be decorated with:
#[deftly(mock(task))]to indicate the field implementingSpawn + BlockOn#[deftly(mock(net))]to indicate the field implementingNetProvider#[deftly(mock(sleep))]to indicate the field implementingSleepProviderandCoarseTimeProvider.#[deftly(mock(toplevel))]to indicate the field implementingToplevelBlockOnunconditionally.#[deftly(mock(toplevel_where = "BOUND"))]to indicate the field implementingToplevelBlockOnonly if BOUND is satisfied. For example,#[deftly(mock(toplevel_where = "R: ToplevelBlockOn"))] runtime: R,.
This is a derive_deftly template. Do not invoke it directly.
To use it, write: #[derive(Deftly)] #[derive_deftly(SomeMockRuntime)].