swc_macros_common

Module binder

source
Expand description

§Example

_binded_a, _binded_b and _binded_0 in below example are BindedField.

struct S {
    a: u8,
    b: u16,
}
let s = S { a: 0, b: 0 };
match s {
    S {
        a: _binded_a,
        b: _binded_b,
    } => {}
}
enum E {
    V1 { a: u8 },
    V2(u16),
    V3,
}
let e = E::V1 { a: 0 };
match e {
    E::V1 { a: _binded_a } => {}
    E::V2(_binded_0) => {}
    E::V3 => {}
}

Adopted from synstructure.

Structs§