• Home
  • Raw
  • Download

Lines Matching +full:structured +full:- +full:clone

20     /// - Outer attributes like `#[repr(transparent)]`. These appear outside or
23 /// - Inner attributes like `#![feature(proc_macro)]`. These appear inside
26 /// - Outer one-line doc comments like `/// Example`.
28 /// - Inner one-line doc comments like `//! Please file an issue`.
30 /// - Outer documentation blocks `/** Example */`.
32 /// - Inner documentation blocks `/*! Please file an issue */`.
42 /// - Meta::Path — attributes whose information content conveys just a
45 /// - Meta::List — attributes that carry arbitrary tokens after the
49 /// - Meta::NameValue — attributes with an `=` sign after the path,
58 /// #[derive(Copy, Clone)]
100 /// fn parse(input: ParseStream) -> Result<Self> {
113 /// # Parsing from Attribute to structured arguments
142 /// * Multi-line comments...
154 /// * Multi-line comments...
178 pub fn path(&self) -> &Path { in path()
214 pub fn parse_args<T: Parse>(&self) -> Result<T> { in parse_args()
237 pub fn parse_args_with<F: Parser>(&self, parser: F) -> Result<F::Output> { in parse_args_with()
261 /// conventional structure used by most of Rust's built-in attributes.
268 /// [syntax]: https://doc.rust-lang.org/reference/attributes.html#meta-item-attribute-syntax
335 /// In some cases, for attributes which have nested layers of structured
385 logic: impl FnMut(ParseNestedMeta) -> Result<()>, in parse_nested_meta()
386 ) -> Result<()> { in parse_nested_meta()
395 /// [*Parsing from tokens to Attribute*](#parsing-from-tokens-to-attribute).
398 pub fn parse_outer(input: ParseStream) -> Result<Vec<Self>> { in parse_outer()
411 /// [*Parsing from tokens to Attribute*](#parsing-from-tokens-to-attribute).
414 pub fn parse_inner(input: ParseStream) -> Result<Vec<Self>> { in parse_inner()
427 /// - `#[repr(transparent)]`
428 /// - `/// # Example`
429 /// - `/** Please file an issue */`
433 /// - `#![feature(proc_macro)]`
434 /// - `//! # Example`
435 /// - `/*! Please file an issue */`
444 /// Content of a compile-time structured attribute.
456 /// A name-value meta is like the `path = "..."` in `#[path =
463 /// [syntax tree enum]: Expr#syntax-tree-enums
468 /// A structured list within an attribute, like `derive(Copy, Clone)`.
471 /// A name-value pair within an attribute, like `feature = "nightly"`.
477 /// A structured list within an attribute, like `derive(Copy, Clone)`.
487 /// A name-value pair within an attribute, like `feature = "nightly"`.
497 /// Returns the path that begins this structured meta item.
501 pub fn path(&self) -> &Path { in path()
512 pub fn require_path_only(&self) -> Result<&Path> { in require_path_only()
524 pub fn require_list(&self) -> Result<&MetaList> { in require_list()
542 pub fn require_name_value(&self) -> Result<&MetaNameValue> { in require_name_value()
562 pub fn parse_args<T: Parse>(&self) -> Result<T> { in parse_args()
569 pub fn parse_args_with<F: Parser>(&self, parser: F) -> Result<F::Output> { in parse_args_with()
571 crate::parse::parse_scoped(parser, scope, self.tokens.clone()) in parse_args_with()
579 logic: impl FnMut(ParseNestedMeta) -> Result<()>, in parse_nested_meta()
580 ) -> Result<()> { in parse_nested_meta()
588 fn outer(self) -> Self::Ret; in outer()
589 fn inner(self) -> Self::Ret; in inner()
593 type Ret = iter::Filter<slice::Iter<'a, Attribute>, fn(&&Attribute) -> bool>;
595 fn outer(self) -> Self::Ret { in outer()
596 fn is_outer(attr: &&Attribute) -> bool { in outer()
605 fn inner(self) -> Self::Ret { in inner()
606 fn is_inner(attr: &&Attribute) -> bool { in inner()
623 pub(crate) fn parse_inner(input: ParseStream, attrs: &mut Vec<Attribute>) -> Result<()> { in parse_inner()
630 pub(crate) fn single_parse_inner(input: ParseStream) -> Result<Attribute> { in single_parse_inner()
640 pub(crate) fn single_parse_outer(input: ParseStream) -> Result<Attribute> { in single_parse_outer()
652 fn parse(input: ParseStream) -> Result<Self> { in parse()
660 fn parse(input: ParseStream) -> Result<Self> { in parse()
668 fn parse(input: ParseStream) -> Result<Self> { in parse()
674 pub(crate) fn parse_meta_after_path(path: Path, input: ParseStream) -> Result<Meta> { in parse_meta_after_path()
684 fn parse_meta_list_after_path(path: Path, input: ParseStream) -> Result<MetaList> { in parse_meta_list_after_path()
693 fn parse_meta_name_value_after_path(path: Path, input: ParseStream) -> Result<MetaNameValue> { in parse_meta_name_value_after_path()
718 fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { in fmt()
729 fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { in fmt()
764 self.delimiter.surround(tokens, self.tokens.clone()); in to_tokens()