macro_rules! assert_next_matches {
    ($stream:expr, $pat:pat) => { ... };
    ($stream:expr, $pat:pat => $arm:expr) => { ... };
}
Expand description

Assert that the stream is ready with a value that matches the given pattern.

Accepts an optional => expression after the pattern that is evaluated if the pattern matched. The expression can reference any bindings from the pattern. The result of the expression is returned from the macro call.