Module macros

Source

Traits§

AttrParse
The AttrParse trait is a generic interface for attribute structures. This is only implemented directly by the crate::def_attrs macro, within the zbus_macros crate. This macro allows the parsing of multiple variants when using the crate::old_new macro pattern, using <T: AttrParse> as a bounds check at compile time.

Functions§

iter_meta_lists
Returns an iterator over the contents of all MetaLists with the specified identifier in an array of Attributes.
match_attribute_with_bool_value
Compares ident and attr and in case they match ensures value is Some and contains a LitBool. Returns true in case ident and attr match, otherwise false.
match_attribute_with_str_list_value
match_attribute_with_str_value
Compares ident and attr and in case they match ensures value is Some and contains a LitStr. Returns true in case ident and attr match, otherwise false.
match_attribute_without_value
Compares ident and attr and in case they match ensures value is None. Returns true in case ident and attr match, otherwise false.
ty_is_option
Checks if a Type’s identifier is “Option”.