break_flow

Macro break_flow 

Source
macro_rules! break_flow {
    (log $n:ident: $l:lifetime: $x:expr) => { ... };
    ($l:lifetime: $x:expr) => { ... };
}
Expand description

Use event_flow! instead.

This macro doesn’t return from the current function, but does a labeled break if the block returns a value for which [ConsumedEvent::is_consumed] == true.

It also does and into() conversion and breaks with the result to the enclosing block given as a 'l:{} labeled block.

  • The difference to try_flow is that this on doesn’t Ok-wrap the result.*
  • The difference to flow is that this breaks instead of return_ing.

Extras: If you add a marker as in break_flow!(log 'f: ident: {...}); the result of the operation is written to the log.