pub struct CompileUnit<'a> { /* private fields */ }Expand description
A validated compile unit ready for reduction admission.
v0.2.2 Phase A (carrier widening): the lifetime parameter 'a ties
the post-validation carrier to its builder’s borrow. The root_term
and target_domains slices are retained through validation so
resolvers can inspect declared structure — previously these fields
were discarded at validate() and every resolver received a
3-field scalar witness with no walkable structure.
Const-constructed compile units use the trivial specialization
CompileUnit<'static> — borrow-free and usable in const contexts.
Implementations§
Source§impl<'a> CompileUnit<'a>
impl<'a> CompileUnit<'a>
Sourcepub const fn witt_level(&self) -> WittLevel
pub const fn witt_level(&self) -> WittLevel
Returns the Witt level ceiling declared at validation time.
Sourcepub const fn thermodynamic_budget(&self) -> u64
pub const fn thermodynamic_budget(&self) -> u64
Returns the thermodynamic budget declared at validation time.
Sourcepub const fn result_type_iri(&self) -> &'static str
pub const fn result_type_iri(&self) -> &'static str
v0.2.2 T6.11: returns the result-type IRI declared at validation
time. The pipeline matches this against the caller’s T::IRI to
detect shape mismatches.
Sourcepub const fn root_term(&self) -> &'a [Term]
pub const fn root_term(&self) -> &'a [Term]
v0.2.2 Phase A: returns the root term slice declared at validation time. Empty for builders that did not supply a term AST.
Sourcepub const fn bindings(&self) -> &'a [Binding]
pub const fn bindings(&self) -> &'a [Binding]
v0.2.2 Phase H1: returns the named bindings declared at validation time.
Consumed by Stage 5 (bindings_from_unit) to materialize the BindingsTable.
Empty slice for compile units that declare no bindings.
Sourcepub const fn target_domains(&self) -> &'a [VerificationDomain]
pub const fn target_domains(&self) -> &'a [VerificationDomain]
v0.2.2 Phase A: returns the verification domains declared at validation time.
Trait Implementations§
Source§impl<'a> Clone for CompileUnit<'a>
impl<'a> Clone for CompileUnit<'a>
Source§fn clone(&self) -> CompileUnit<'a>
fn clone(&self) -> CompileUnit<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for CompileUnit<'a>
impl<'a> Debug for CompileUnit<'a>
Source§impl<'a> PartialEq for CompileUnit<'a>
impl<'a> PartialEq for CompileUnit<'a>
Source§fn eq(&self, other: &CompileUnit<'a>) -> bool
fn eq(&self, other: &CompileUnit<'a>) -> bool
self and other values to be equal, and is used by ==.