ParseAttribute

Trait ParseAttribute 

Source
pub(crate) trait ParseAttribute: Default {
    type Parent<'a>: Copy;

    // Required method
    fn parse(&mut self, meta: &ParseNestedMeta<'_>) -> Result<bool>;

    // Provided methods
    fn from_parent(_parent: Self::Parent<'_>) -> Self { ... }
    fn merge(&mut self, _parent: Self::Parent<'_>) { ... }
    fn from_attributes<I: ?Sized>(
        path: &I,
        attributes: &mut Vec<Attribute>,
        parent: Self::Parent<'_>,
    ) -> Result<Self>
       where Ident: PartialEq<I> { ... }
}

Required Associated Types§

Source

type Parent<'a>: Copy

Required Methods§

Source

fn parse(&mut self, meta: &ParseNestedMeta<'_>) -> Result<bool>

Provided Methods§

Source

fn from_parent(_parent: Self::Parent<'_>) -> Self

Source

fn merge(&mut self, _parent: Self::Parent<'_>)

Source

fn from_attributes<I: ?Sized>( path: &I, attributes: &mut Vec<Attribute>, parent: Self::Parent<'_>, ) -> Result<Self>
where Ident: PartialEq<I>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§