Struct syntax::ast::Attribute[][src]

pub struct Attribute {
    pub id: AttrId,
    pub style: AttrStyle,
    pub path: Path,
    pub tokens: TokenStream,
    pub is_sugared_doc: bool,
    pub span: Span,
}

Meta-data associated with an item Doc-comments are promoted to attributes that have is_sugared_doc = true

Fields

Methods

impl Attribute
[src]

Returns the last segment of the name of this attribute. E.g. foo for #[foo], skip for #[rustfmt::skip].

Indicates if the attribute is a Value String.

impl Attribute
[src]

Extract the MetaItem from inside this Attribute.

Convert self to a normal #[doc="foo"] comment, if it is a comment like /// or /** */. (Returns self unchanged for non-sugared doc attributes.)

Trait Implementations

impl Clone for Attribute
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Attribute
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Attribute
[src]

impl Encodable for Attribute
[src]

impl Decodable for Attribute
[src]

impl Hash for Attribute
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for Attribute
[src]

Formats the value using the given formatter. Read more

impl ToTokens for Attribute
[src]

Important traits for Vec<u8>

Auto Trait Implementations

impl !Send for Attribute

impl !Sync for Attribute