Struct syntex_syntax::ast::Attribute [] [src]

pub struct Attribute {
    pub id: AttrId,
    pub style: AttrStyle,
    pub value: MetaItem,
    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]

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]

Serialize a value using an Encoder.

impl Decodable for Attribute
[src]

Deserialize a value using a Decoder.

impl Hash for Attribute
[src]

Feeds this value into the state given, updating the hasher as necessary.

Feeds a slice of this type into the state provided.

impl Debug for Attribute
[src]

Formats the value using the given formatter.

impl ToTokens for Attribute
[src]