Trait Attribute

Source
pub trait Attribute: Clone + Eq {
    type Expression: Expression;

    // Required methods
    fn name(&self) -> Option<Ident>;
    fn value(&self) -> AttrVal<Self::Expression>;

    // Provided method
    fn is_named(&self) -> bool { ... }
}

Required Associated Types§

Required Methods§

Source

fn name(&self) -> Option<Ident>

Source

fn value(&self) -> AttrVal<Self::Expression>

Provided Methods§

Source

fn is_named(&self) -> bool

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§