Macro cglue_macro::check
source · check!() { /* proc-macro */ }
Expand description
Check if the group can be cast to the specified traits.
The syntax is similar to a cast expression, but uses impl
keyword:
ⓘ
check!(obj impl Trait1 + Trait2 + Trait3);
The result of check!
will be a boolean value.
This macro accepts either:
- A list of optional traits, without any mandatory traits.
or
- A list of optional traits, with every mandatory trait.
In either case a successfully cast object will still implement the mandatory traits.