Skip to main content

handle_bool

Macro handle_bool 

Source
macro_rules! handle_bool {
    ($condition:expr, $variant:ident$(,)? $($arg:ident$(: $value:expr)?),*) => { ... };
}
Expand description

Returns an error when the condition is true.

This is useful for guard checks that should fail fast with a specific error variant.