Module prelude

Source
Expand description

Prelude to use essentials: use my_module::prelude::*.

Modules§

parse_macro_input
parse_qt
parse_quote
proc_macro2
githubcrates-iodocs-rs
quote
githubcrates-iodocs-rs
syn
githubcrates-iodocs-rs

Macros§

Token
A type-macro that expands to the name of the Rust type representation of a given token.
_if_make
Generate code only if feature::make is enabled.
braced
Parse a set of curly braces and expose their content to subsequent parsers.
bracketed
Parse a set of square brackets and expose their content to subsequent parsers.
code_diagnostics_str
Macro for diagnostics purpose to diagnose source code behind it and export it into a string.
code_export_str
Macro to export source code behind a syntax tree into a string.
code_print
Macro for diagnostics purpose to print both syntax tree and source code behind it without syntax tree.
custom_keyword
Define a type that supports parsing and printing a given identifier as if it were a keyword.
custom_punctuation
Define a type that supports parsing and printing a multi-character symbol as if it were a punctuation token.
make
Variadic constructor.
parenthesized
Parse a set of parentheses and expose their content to subsequent parsers.
parse_macro_input
Parse the input TokenStream of a macro, triggering a compile error if the tokens fail to parse.
parse_qt
Quasi-quotation macro that accepts input like the quote! macro but uses type inference to figure out a return type for those tokens.
parse_quote
Quasi-quotation macro that accepts input like the quote! macro but uses type inference to figure out a return type for those tokens.
parse_quote_spanned
This macro is parse_quote! + quote_spanned!.
qt
The whole point.
syn_err
Macro to generate syn error either with span of a syntax tree element or with default one proc_macro2::Span::call_site().
tree_diagnostics_str
Macro for diagnostics purpose to export both syntax tree and source code behind it into a string.
tree_print
Macro for diagnostics purpose to print both syntax tree and source code behind it with syntax tree.
types
Type constructor to define tuple wrapping a given type.

Structs§

EnumerableIteratorConsumable
Iterator for enumerable.
EnumerableIteratorNonConsumable
Iterator for enumerable.
HomoPair
Type constructor to wrap pair of the same type.
Many
Type constructor to wrap a vector.
Pair
Type constructor to wrap two types into a tuple.
Single
Type constructor to wrap a another type into a tuple.

Traits§

AsArray
Reinterpret as array.
AsMuchAsPossibleNoDelimiter
Marker saying how to parse several elements of such type in a row.
AsSlice
Reinterpret as slice.
AsTuple
Reinterpret as tuple.
CloneAsArray
Clone as array.
CloneAsTuple
Clone as tuple.
Enumerable
Has length and indexed access.
GenericsAnalyze
To analyze generics.
Make0
Constructor without arguments.
Make1
Constructor with single argument.
Make2
Constructor with two arguments.
Make3
Constructor with three arguments.
Name
Trait to get name of an syntax element.
VectorizedFrom
Implementation of trait From to vectorize into/from.
VectorizedInto
Implementation of trait Into to vectorize into/from.

Type Aliases§

ParseStream
Input to a Syn parser function.
Result
Result with syn::Error.