zvariant_utils::macros

Trait AttrParse

Source
pub trait AttrParse {
    // Required methods
    fn parse_meta(&mut self, meta: &Meta) -> Result<()>;
    fn parse_nested_metas<I>(iter: I) -> Result<Self>
       where I: IntoIterator<Item = Meta>,
             Self: Sized;
    fn parse(attrs: &[Attribute]) -> Result<Self>
       where Self: Sized;
}
Expand description

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.

Required Methods§

Source

fn parse_meta(&mut self, meta: &Meta) -> Result<()>

Source

fn parse_nested_metas<I>(iter: I) -> Result<Self>
where I: IntoIterator<Item = Meta>, Self: Sized,

Source

fn parse(attrs: &[Attribute]) -> Result<Self>
where Self: Sized,

Implementors§