Expand description
AST-based type analysis utilities.
All wrapper extraction operates on syn::Type AST nodes by checking the
final path segment ident — never on a string representation of the type.
This means Json<T>, axum::Json<T>, and axum::extract::Json<T> are
all matched identically.
Structs§
- Wrapper
Match - The generic argument list of a matched wrapper type.
Constants§
Functions§
- extract_
first_ generic_ arg_ string - Extract the first generic argument from a type string.
- extract_
wrapper - Extract the generic arguments of
wrapper_name<...>fromty, or return a structured error if the wrapper is not present or has no type arguments. - innermost_
custom_ type - Recursively unwrap well-known wrappers and return the innermost type.
- is_
primitive - Returns
truefor Rust primitive types and the unit type(). - is_
primitive_ type_ name - Check if a type name string represents a Rust primitive or standard type.
- last_
ident_ matches - Check if the last path segment ident matches the given name.
- try_
extract_ wrapper - Extract the generic arguments of
wrapper_name<...>fromty.