Skip to main content

SymbolicIrContext

Struct SymbolicIrContext 

Source
pub struct SymbolicIrContext { /* private fields */ }
Expand description

Reusable state for generating symbolic IR across many templates that share one DefineIndex.

The context owns exact parse/helper-analysis caches. Reusing it across templates avoids recomputing helper bodies without changing analysis semantics; a cache miss and cache hit return the same structural facts.

Implementations§

Source§

impl SymbolicIrContext

Source

pub fn new(defines: &DefineIndex) -> Self

Creates a reusable symbolic-analysis context for indexed chart sources.

Source

pub fn with_chart_default_strings( defines: &DefineIndex, chart_default_strings: BTreeMap<String, String>, ) -> Self

Build a context that can execute chart-authored string defaults when a tpl call selects them. The strings are not general inference evidence; they are consulted only at that explicit execution boundary.

Source

pub fn with_policy( defines: &DefineIndex, chart_default_strings: BTreeMap<String, String>, kubernetes_version: Option<String>, ) -> Self

Build a context carrying analysis policy inputs: the chart-authored string defaults plus the normalized Kubernetes version (.Capabilities.KubeVersion conditions evaluate against it; None abstains them).

Source

pub fn generate_contract_ir(&self, src: &str) -> ContractIr

Generate the opaque contract graph without finalizing it.

Callers that need to combine, scope, or otherwise transform chart-local contracts should use this method and derive schema facts with ContractIr::finalize. Inspection output can finalize the graph once and ask the resulting contract for its stable document.

Source

pub fn generate_contract_ir_for_source( &self, src: &str, source_path: &str, ) -> ContractIr

Builds contract IR while attaching a logical template source path.

Source

pub fn eval_document_fragment(&self, src: &str) -> EvaluatedDocument

Evaluate a template into the abstract fragment domain, reusing this context’s memoized helper analyses.

Trait Implementations§

Source§

impl Clone for SymbolicIrContext

Source§

fn clone(&self) -> SymbolicIrContext

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

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> 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