Crate authzen_proc_macro_util

Source

Macros§

ok_or_return_compile_error

Structs§

MatchPathError
represents the diff between two paths which do not have a full suffix match
MatchedAttribute
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.
UnmatchedPathPrefix

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