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
The internal crate::module::… path of a DefId (e.g. alloc::rcs::rc::Rc), normalised from its def_path_str debug form. Used for display/debug and as the fallback in public_def_path for items without a Ty.
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_std_type πŸ”’
Match a short type name against std types resolved by name-scan (no lang/diagnostic item), e.g. std::ascii::Char (AsciiChar) whose Char short name otherwise collides with the primitive char.
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).
public_def_path
The canonical std JSON asset key for a DefId, prefixed by its defining crate. Types resolve re-exports; inherent methods keep the module::method shape, except that the private alloc::rcs module (Rust 1.96+) is mapped back to the public rc/sync.
public_ty_path πŸ”’
The public path of a type (re-exports resolved: alloc::rc::Rc), with the crate prefix and generic args stripped. public_def_path re-adds the crate.
resolve_field_name
short_fn_name