Skip to main content

Attribute

Trait Attribute 

Source
pub trait Attribute<V>: AttributeName + TryFromMeta<V, Metadata = <V as SynVersion>::Attribute>
where V: SynVersion,
{ // Provided method fn from_attrs( location: Span, attrs: Vec<<V as SynVersion>::Attribute>, ) -> Result<Self, Vec<<V as SynVersion>::Error>> { ... } }
Expand description

Represents a struct that can be deserialized from Syn attributes.

Provided Methods§

Source

fn from_attrs( location: Span, attrs: Vec<<V as SynVersion>::Attribute>, ) -> Result<Self, Vec<<V as SynVersion>::Error>>

Creates a deserialized attribute from a list of Syn attributes.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<V, T> Attribute<V> for Option<T>
where V: SynVersion, T: Attribute<V>, Option<T>: TryFromMeta<V, Metadata = <V as SynVersion>::Attribute>,

Implementors§