Macro crux_core::assert_effect

source ·
macro_rules! assert_effect {
    ($expression:expr, $(|)? $( $pattern:pat_param )|+ $( if $guard: expr )? $(,)?) => { ... };
}
Expand description

Panics if the pattern doesn’t match an Effect from the specified Update

Like in a match expression, the pattern can be optionally followed by if and a guard expression that has access to names bound by the pattern.

§Example

use crux_core::assert_effect;
assert_effect!(update, Effect::Render(_));