Skip to main content

Crate zyn

Crate zyn 

Source

Modules§

ast
case
debug
diagnostic
extract
ident
meta
pipes
prelude
proc_macro2
githubcrates-iodocs-rs
quote
githubcrates-iodocs-rs
syn
githubcrates-iodocs-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::Data from 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.
TokenStream
An abstract stream of tokens, or more concretely a sequence of token trees.
Variants
Element extractor that pulls enum variants from the input.

Enums§

Arg
Input
Level
An enum representing a diagnostic level.

Traits§

Expand
FromArg
Converts a single Arg into a typed value.
FromData
Converts syn::Data into a specific data representation.
FromFields
Converts syn::Fields into a specific fields representation.
FromInput
Extracts a value from the macro input context.
Pipe
Render
SpanDiagnosticExt
Extension trait for proc_macro2::Span emulating 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 haystack if 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.

Type Aliases§

Result

Attribute Macros§

element
pipe

Derive Macros§

Attribute