Skip to main content

with

Macro with 

Source
macro_rules! with {
    () => { ... };
    (all) => { ... };
    (required) => { ... };
    (required; $($id:path $(|)?)*) => { ... };
    (system) => { ... };
    (system; $($id:path $(|)?)*) => { ... };
    ($id0:path $(| $id:path $(|)?)*) => { ... };
}
Expand description

Re-export the rs-matter crate A macro that generates a “with” fn for matching attributes and commands

Usage:

  • with!() - returns false for all attributes and commands
  • with!(all) - returns true for all attributes and commands
  • with!(attr_or_cmd1, attr_or_cmd2, ...) - returns true for the specified attributes or commands
  • with!(required[; (attr1, attr2, ...)]) - returns true for all mandatory attributes and the specified attributes
  • with!(system[; (attr1, attr2, ...)]) - returns true for all system attributes and the specified attributes