Skip to main content

Module name

Module name 

Source

FunctionsΒ§

access_ident_recursive
Walk a syn::Expr and produce the root identifier together with any field projections.
extract_pat_ident πŸ”’
Parse argument names and types from a local function’s HIR body. Recursively unwrap Ref/Paren patterns to find the inner binding identifier. Needed because &self / &mut self produce PatKind::Ref(PatKind::Binding(…)).
find_declared_generic_param πŸ”’
find_generic_in_ty πŸ”’
Recursively walk a Ty tree looking for a type whose name matches type_ident.
find_generic_param πŸ”’
Search function parameters (and the self type for methods) for a generic type whose name matches type_ident.
get_cleaned_def_path_name
Clean a DefId debug representation into a human-readable path.
get_known_std_names πŸ”’
Look up known argument names for standard-library APIs.
get_std_api_signature_json πŸ”’
Return the JSON value loaded from the pre-computed standard-library signature map (data/std_sig.json).
get_struct_name πŸ”’
Extract the implementing struct name from a DefId that belongs to an associated item (method / associated function).
get_struct_self_ty
Return the resolved self type for a method whose DefId points to an associated item that lives inside an impl block returning an ADT, or for a struct/enum DefId directly (needed for parsing struct-invariant annotations).
match_primitive_type πŸ”’
Match a string against Rust’s primitive types, returning the corresponding Ty from the type context.
match_ty_with_ident
Match a type-identifier string to a concrete Ty.
parse_local_signature πŸ”’
parse_outside_signature πŸ”’
Parse argument names and types from an external function’s type signature.
parse_signature
Dispatch argument-name/type parsing to either the local HIR path or the external type-based path.
parse_trait_fn_sig πŸ”’
Extract parameter names from a HIR trait method declaration and pair them with types from the function signature. Handles TraitFn::Required (names directly in the declaration) and TraitFn::Provided (names in the body).
resolve_field_name
short_fn_name