wasm_component_layer 0.1.18

WebAssembly component model implementation for any backend.
Documentation
1
2
3
4
5
6
7
8
9
10
11
/// Checks that the provided expression matches a pattern, or returns with an error.
macro_rules! require_matches {
    ($expression:expr, $pattern:pat $(if $guard:expr)?, $then: expr) => {
        match $expression {
            $pattern $(if $guard)? => $then,
            _ => bail!("Incorrect type.")
        }
    };
}

pub(crate) use require_matches;