Expand description
Useful includes
Re-exports§
pub use crate::generate::FnSelfArg;pub use crate::generate::Generator;pub use crate::generate::StreamBuilder;pub use crate::parse::AttributeAccess;pub use crate::parse::Body;pub use crate::parse::EnumVariant;pub use crate::parse::Fields;pub use crate::parse::FromAttribute;pub use crate::parse::Parse;pub use crate::parse::UnnamedField;pub use crate::Error;pub use crate::Result;
Modules§
- Public implementation details for the
TokenStreamtype, such as iterators. - tracked_envExperimentalTracked access to environment variables.
- tracked_pathExperimentalTracked access to additional files.
Macros§
- quoteExperimental
quote!(..)accepts arbitrary tokens and expands into aTokenStreamdescribing the input. For example,quote!(a + b)will produce an expression, that, when evaluated, constructs theTokenStream[Ident("a"), Punct('+', Alone), Ident("b")].
Structs§
- A delimited token stream.
- An identifier (
ident). - Error returned from
TokenStream::from_str. - A literal string (
"hello"), byte string (b"hello"), character ('a'), byte character (b'a'), an integer or floating point number with or without a suffix (1,1u8,2.3,2.3f32). Boolean literals liketrueandfalsedo not belong here, they areIdents. - A
Punctis a single punctuation character such as+,-or#. - A region of source code, along with macro expansion information.
- The main type provided by this crate, representing an abstract stream of tokens, or, more specifically, a sequence of token trees. The type provides interfaces for iterating over those token trees and, conversely, collecting a number of token trees into one stream.
- DiagnosticExperimentalA structure representing a diagnostic message and associated children messages.
- ExpandErrorExperimentalError returned from
TokenStream::expand_expr. - SourceFileExperimentalThe source file of a given
Span.
Enums§
- Describes how a sequence of token trees is delimited.
- Indicates whether a
Puncttoken can join with the following token to form a multi-character operator. - A single token or a delimited sequence of token trees (e.g.,
[1, (), ..]). - LevelExperimentalAn enum representing a diagnostic level.
Traits§
- MultiSpanExperimentalTrait implemented by types that can be converted into a set of
Spans.
Functions§
- Determines whether proc_macro has been made accessible to the currently running program.
- quoteExperimentalQuote a
TokenStreaminto aTokenStream. This is the actual implementation of thequote!()proc macro. - quote_spanExperimentalQuote a
Spaninto aTokenStream. This is needed to implement a custom quoter.