Macros§
Structs§
- Match
Path Error - represents the diff between two paths which do not have a full suffix match
- Matched
Attribute - Represents an attribute found on a struct which was matched for by its path. Includes additional context about where the attribute is found within the struct.
- Unmatched
Path Prefix
Functions§
- add_
bounds_ to_ generics - Adds all trait bounds to all generic params. Skips adding bound to param if it already exists. A bound is considered to already exist if:
- add_
general_ bounds_ to_ generics - Adds bounds to a
syn::Generics
’s where predicate, where the bounded types/lifetimes are not necessarily parameters of the generics. This permits applying bounds to compositions of generic parameters. - bounds_
union - add bounds to an existing set of bounds while not adding any duplicates
- find_
field_ attribute_ in_ struct - Finds a field attribute in a
syn::DeriveInput
matching the provided path. Will throw error if the provided AST is not a struct. Expects there to be exactly one matching attribute in the struct - find_
field_ attributes_ in_ struct - Finds all field attributes in a
syn::DeriveInput
matching the provided path. Will throw error if the provided AST is not a struct. - is_
param_ exact_ field_ type - match_
path - if subpath_candidate is a suffix contained in the provided full_path, Some(syn::Path) is returned which is the unmatched portion of full_path
- match_
paths - pretty