Lines Matching defs:Attribute

72     /// # Parsing from tokens to Attribute
77 /// [`Attribute::parse_outer`] or [`Attribute::parse_inner`] depending on
85 /// use syn::{Attribute, Ident, Result, Token};
93 /// attrs: Vec<Attribute>,
102 /// attrs: input.call(Attribute::parse_outer)?,
113 /// # Parsing from Attribute to structured arguments
124 /// [`parse_args()`]: Attribute::parse_args
165 pub struct Attribute {
173 impl Attribute {
200 /// use syn::{parse_quote, Attribute, Expr};
202 /// let attr: Attribute = parse_quote! {
223 /// use syn::{parse_quote, Attribute};
225 /// let attr: Attribute = parse_quote! {
229 /// let bwom = attr.parse_args_with(Attribute::parse_outer)?;
231 /// // Attribute does not have a Parse impl, so we couldn't directly do:
232 /// // let bwom: Attribute = attr.parse_args()?;
263 /// The [*Meta Item Attribute Syntax*][syntax] section in the Rust reference
395 /// [*Parsing from tokens to Attribute*](#parsing-from-tokens-to-attribute).
411 /// [*Parsing from tokens to Attribute*](#parsing-from-tokens-to-attribute).
559 /// See [`Attribute::parse_args`].
566 /// See [`Attribute::parse_args_with`].
574 /// See [`Attribute::parse_nested_meta`].
586 type Ret: Iterator<Item = &'a Attribute>;
592 impl<'a> FilterAttrs<'a> for &'a [Attribute] {
593 type Ret = iter::Filter<slice::Iter<'a, Attribute>, fn(&&Attribute) -> bool>;
596 fn is_outer(attr: &&Attribute) -> bool {
606 fn is_inner(attr: &&Attribute) -> bool {
623 pub(crate) fn parse_inner(input: ParseStream, attrs: &mut Vec<Attribute>) -> Result<()> {
630 pub(crate) fn single_parse_inner(input: ParseStream) -> Result<Attribute> {
632 Ok(Attribute {
640 pub(crate) fn single_parse_outer(input: ParseStream) -> Result<Attribute> {
642 Ok(Attribute {
748 impl ToTokens for Attribute {