macro_rules! impl_modifier_node {
(draw) => { ... };
(pointer_input) => { ... };
(semantics) => { ... };
(focus) => { ... };
(draw, $($rest:tt)*) => { ... };
(pointer_input, $($rest:tt)*) => { ... };
(semantics, $($rest:tt)*) => { ... };
(focus, $($rest:tt)*) => { ... };
}Expand description
Comprehensive macro that implements all capability-based methods for a modifier node.
This macro reduces boilerplate by automatically implementing the as_* methods for all specialized traits that the type implements. Use this as the primary way to declare which traits your node implements.
ยงExample
impl ModifierNode for MyDrawNode {
impl_modifier_node!(draw);
}
impl ModifierNode for MyPointerNode {
impl_modifier_node!(pointer_input);
}
impl ModifierNode for MyComplexNode {
impl_modifier_node!(draw, pointer_input, semantics);
}