Skip to main content

derive_deftly_template_CircuitReactor

Macro derive_deftly_template_CircuitReactor 

Source
macro_rules! derive_deftly_template_CircuitReactor {
    ({ $($driver:tt)* } [$($aoptions:tt)*] ($($future:tt)*) $($tpassthrough:tt)*) => { ... };
    ($($wrong:tt)*) => { ... };
}
Expand description

Helper for deriving the boilerplate run() function of a circuit reactor.

ยงCustom attributes

  • #[deftly(reactor_name = "...")] (toplevel): The name of the reactor, for logging purposes. Must be a literal string.

  • #[deftly(run_inner_fn = "FUNCTION")] (toplevel): The function to run from run(), possibly in a loop. FUNCTION is a function with the signature async fn run_once(&mut Self) -> Result<(), ReactorError>

  • #[deftly(only_run_once)] (toplevel): Whether the run() function should only run run_inner_fn once

This is a derive_deftly template. Do not invoke it directly. To use it, write: #[derive(Deftly)] #[derive_deftly(CircuitReactor)].