Skip to main content

Module

Struct Module 

Source
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

Source

pub fn new(name: ModuleName) -> Self

Source

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.

Trait Implementations§

Source§

impl Clone for Module

Source§

fn clone(&self) -> Module

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Module

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Module

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for Module

Source§

impl PartialEq for Module

Source§

fn eq(&self, other: &Module) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Module

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Module

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more