Modules§
- ast
- case
- debug
- diagnostic
- extract
- ident
- meta
- pipes
- prelude
- proc_
macro2 - github crates-io docs-rs
- quote
- github crates-io docs-rs
- syn
- github crates-io docs-rs
- types
Macros§
- camel
- Converts a string or ident to camelCase.
- expand
- format_
ident - Formatting macro for constructing
Idents. - kebab
- Converts a string or ident to kebab-case.
- parse
- parse_
input - pascal
- Converts a string or ident to PascalCase.
- screaming
- Converts a string or ident to SCREAMING_SNAKE_CASE.
- snake
- Converts a string or ident to snake_case.
- zyn
Structs§
- Args
- Attr
- Element extractor that resolves a
#[derive(Attribute)]struct from the input’s attributes. - Data
- Element extractor that pulls the
syn::Datafrom a derive input. - Diagnostic
- A structure representing a diagnostic message and associated children messages.
- Diagnostics
- Extract
- Generic extractor wrapper — delegates to
T::from_input. - Fields
- Element extractor that pulls struct fields from the input.
- Span
- A region of source code, along with macro expansion information.
- Token
Stream - An abstract stream of tokens, or more concretely a sequence of token trees.
- Variants
- Element extractor that pulls enum variants from the input.
Enums§
Traits§
- Expand
- FromArg
- Converts a single
Arginto a typed value. - From
Data - Converts
syn::Datainto a specific data representation. - From
Fields - Converts
syn::Fieldsinto a specific fields representation. - From
Input - Extracts a value from the macro input context.
- Pipe
- Render
- Span
Diagnostic Ext - Extension trait for
proc_macro2::Spanemulating the proc-macro diagnostic API on stable and nightly. - ToDiagnostics
- ToTokens
- Types that can be interpolated inside a
quote!invocation.
Functions§
- closest_
match - Returns the closest matching string from
haystackif the edit distance is at most 3. Used for “did you mean?” suggestions in error messages. - levenshtein
- Computes the Levenshtein edit distance between two strings.