pub struct ContractIr { /* private fields */ }Expand description
Opaque guarded contract graph for one template interpretation.
Accumulation, path rebasing, and normalization live behind this contract-layer artifact instead of a raw vector owned by callers.
Implementations§
Source§impl ContractIr
impl ContractIr
Sourcepub fn from_contract_uses(uses: Vec<ContractUse>) -> Self
pub fn from_contract_uses(uses: Vec<ContractUse>) -> Self
Build a contract graph from already-structured contract claims.
This is the contract-layer constructor for tests and expert callers
that already have semantic claims. Schema signals are still derived
through ContractIr::finalize, so semantic finalization stays on
the contract graph rather than a serialized document.
Sourcepub fn push_pathless_scalar(&mut self, source_expr: impl Into<String>)
pub fn push_pathless_scalar(&mut self, source_expr: impl Into<String>)
Add a pathless scalar claim for a value path.
Pathless claims make a value path visible to downstream schema generation without asserting any rendered Kubernetes field shape.
Sourcepub fn push_pathless_dependency_fragment(
&mut self,
source_expr: impl Into<String>,
)
pub fn push_pathless_dependency_fragment( &mut self, source_expr: impl Into<String>, )
Records a pathless fragment accepted at a dependency values root.
Sourcepub fn append(&mut self, other: Self)
pub fn append(&mut self, other: Self)
Move all claims from another contract graph into this graph.
Sourcepub fn add_terminal_fail_condition(&mut self, condition: Predicate)
pub fn add_terminal_fail_condition(&mut self, condition: Predicate)
Append guards to every claim in the graph without rewriting any paths.
This is used for chart-structural activation predicates that apply to
an already-scoped batch of claims, such as dependency condition: /
tags: liveness from Chart.yaml.
Record that rendering FAILS whenever condition holds — an
unconditionally reached include whose helper only an inactive
optional dependency defines aborts with “no template”. The predicate
lowers through the standard terminal-clause machinery.
Sourcepub fn append_guards_to_all_uses(&mut self, guards: &[Guard])
pub fn append_guards_to_all_uses(&mut self, guards: &[Guard])
Conjoins activation guards onto every use and terminating failure.
Sourcepub fn mark_rendered_output_textual(&mut self)
pub fn mark_rendered_output_textual(&mut self)
Mark rendered claims as textual output rather than structured YAML placements. Runtime operand contracts and terminal effects remain unchanged.
Sourcepub fn map_value_paths<F>(&mut self, map: F)
pub fn map_value_paths<F>(&mut self, map: F)
Rewrite all referenced values paths while preserving rendered YAML paths.
This is used at chart boundaries where a dependency’s .Values.foo
contract becomes .Values.subchart.foo, while rendered manifest paths
such as metadata.name stay unchanged.
Sourcepub fn add_type_hint(
&mut self,
path: impl Into<String>,
schema_type: impl Into<String>,
)
pub fn add_type_hint( &mut self, path: impl Into<String>, schema_type: impl Into<String>, )
Add declared input-type hints for values paths without projecting them as inspection rows.
Sourcepub fn finalize(self) -> FinalizedContract
pub fn finalize(self) -> FinalizedContract
Finalize the contract once and derive downstream artifacts from that one normalized contract representation.
Trait Implementations§
Source§impl Clone for ContractIr
impl Clone for ContractIr
Source§fn clone(&self) -> ContractIr
fn clone(&self) -> ContractIr
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ContractIr
impl Debug for ContractIr
Source§impl Default for ContractIr
impl Default for ContractIr
Source§fn default() -> ContractIr
fn default() -> ContractIr
impl Eq for ContractIr
Source§impl PartialEq for ContractIr
impl PartialEq for ContractIr
impl StructuralPartialEq for ContractIr
Auto Trait Implementations§
impl Freeze for ContractIr
impl RefUnwindSafe for ContractIr
impl Send for ContractIr
impl Sync for ContractIr
impl Unpin for ContractIr
impl UnsafeUnpin for ContractIr
impl UnwindSafe for ContractIr
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.