pub struct Module {Show 20 fields
pub name: ModuleName,
pub visibility: Visibility,
pub behaviours: Vec<ModuleName>,
pub exports: Vec<FunArity>,
pub export_types: Vec<TypeArity>,
pub callbacks: Vec<CallbackSig>,
pub optional_callbacks: Vec<FunArity>,
pub specs: Vec<SpecSig>,
pub types: Vec<TypeDecl>,
pub opaques: Vec<TypeArity>,
pub deprecations: Vec<Deprecation>,
pub clause_heads: BTreeMap<FunArity, Vec<Vec<ArgShape>>>,
pub path: Option<String>,
pub app: Option<ApplicationName>,
pub records: Vec<RecordDecl>,
pub test_only_exports: Vec<TestOnlyExport>,
pub ifdef_macros: Vec<IfdefMacro>,
pub variant_c_blocks: Vec<VariantCBlock>,
pub versioned_machine_version: Option<VersionedMachineVersion>,
pub wire_constants: Vec<WireConstantBinding>,
}Fields§
§name: ModuleName§visibility: Visibility§behaviours: Vec<ModuleName>§exports: Vec<FunArity>§export_types: Vec<TypeArity>§callbacks: Vec<CallbackSig>§optional_callbacks: Vec<FunArity>§specs: Vec<SpecSig>§types: Vec<TypeDecl>§opaques: Vec<TypeArity>§deprecations: Vec<Deprecation>§clause_heads: BTreeMap<FunArity, Vec<Vec<ArgShape>>>Per-export clause-head patterns: the disjunction of clauses that define this function. Populated by the source extractor (when it gains this capability). Used by the analyzer to flag calls whose argument shape doesn’t satisfy any clause head at the pin.
path: Option<String>Source path relative to the project root. None on format
version 1 snapshots; populated on v2.
app: Option<ApplicationName>Application this module belongs to. None on v1 and for
single-app projects.
records: Vec<RecordDecl>Records declared inline in the .erl file. Distinct from
HrlFile.records. v2 and later.
test_only_exports: Vec<TestOnlyExport>Exports declared inside an -ifdef(TEST) block. Test-only
exports drive cascade planning for the unconditional-exports
refactor: they are not part of the public API at the tag but the
planner needs to know they exist on this branch.
ifdef_macros: Vec<IfdefMacro>-define(...) macros that live inside -ifdef(TEST) body
blocks (the macro itself is only visible under the guard).
Needed by the Variant B unwrap planner: when the body block
becomes unconditional, every macro it depends on must move
out together with the function bodies.
variant_c_blocks: Vec<VariantCBlock>-ifndef(TEST)/-else/-endif regions: a function with two
bodies, a production one and a test one. Recorded for
surfacing; no verdict rule fires on them.
versioned_machine_version: Option<VersionedMachineVersion>Extracted body of the version function for modules that implement
a versioned_machine_impl declared by the project family (e.g.
rabbit_fifo:version/0). None when the module is not a declared
versioned-machine impl or when the body did not resolve. Format
version 4 and later.
wire_constants: Vec<WireConstantBinding>Bound values of the wire-bearing macros declared by the project
family for this module (e.g. RA_PROTO_VERSION on ra). Empty
when the module declares no tracked wire constants. Format
version 4 and later.
Implementations§
Source§impl Module
impl Module
pub fn new(name: ModuleName) -> Self
Sourcepub fn missing_clause_bodies(&self) -> Vec<FunArity>
pub fn missing_clause_bodies(&self) -> Vec<FunArity>
Exports that have no matching clause head. An empty
clause_heads (older snapshots without the field populated)
returns an empty list so this never false-fires on legacy data.