Struct futures_await_syn::Attribute
[−]
[src]
pub struct Attribute { pub style: AttrStyle, pub pound_token: Pound, pub bracket_token: Bracket, pub path: Path, pub tts: Vec<TokenTree>, pub is_sugared_doc: bool, }
Doc-comments are promoted to attributes that have is_sugared_doc
= true
Fields
style: AttrStyle
pound_token: Pound
bracket_token: Bracket
path: Path
The path of the attribute.
E.g. derive
in #[derive(Copy)]
E.g. crate::precondition
in #[crate::precondition x < 5]
tts: Vec<TokenTree>
Any tokens after the path.
E.g. ( Copy )
in #[derive(Copy)]
E.g. x < 5
in #[crate::precondition x < 5]
is_sugared_doc: bool
Methods
impl Attribute
[src]
fn parse_outer(i: Cursor) -> PResult<Self>
impl Attribute
[src]
fn meta_item(&self) -> Option<MetaItem>
[src]
Parses the tokens after the path as a MetaItem
if possible.
Trait Implementations
impl ToTokens for Attribute
[src]
fn to_tokens(&self, tokens: &mut Tokens)
[src]
Write self
to the given Tokens
. Read more
fn into_tokens(self) -> Tokens
[src]
Convert self
directly into a Tokens
object. Read more