Module macro_tools::generic_params
source · Expand description
Functions and structures to handle and manipulate generic parameters using the syn
crate. It’s designed to support macro-driven code generation by simplifying, merging, extracting, and decomposing syn::Generics
.
Re-exports§
pub use super::exposed::*;
Structs§
- A
GenericsWithWhere
struct to handle the parsing of Rust generics with an explicitwhere
clause.
Functions§
- Decomposes
syn::Generics
into components suitable for different usage contexts in Rust implementations, specifically focusing on different requirements forimpl
blocks and type definitions. - Merges two
syn::Generics
instances into a new one. - Extracts the names of type parameters, lifetimes, and const parameters from the given
Generics
. - Extracts parameter names from the given
Generics
, dropping bounds, defaults, and the where clause.