Skip to main content

process

Macro process 

Source
macro_rules! process {
    (input: $input:expr, state: $state:expr, metrics: $metrics:expr, with: $effect:ident => $handle:expr) => { ... };
}
Expand description

Process an Input and handle the emitted Effects.

§Example

malachitebft_core_consensus::process!(
    // Input to process
    input: input,
    // Consensus state
    state: &mut state,
    // Metrics
    metrics: &metrics,
   // Effect handler
    on: effect => handle_effect(effect).await
)