pub struct ExprTreeCalc { /* private fields */ }Implementations§
Source§impl ExprTreeCalc
impl ExprTreeCalc
Sourcepub fn edit_cell_source(
&mut self,
path: TablePath,
input: Input,
caller_policy: ReadPolicy,
) -> SourceEditOutcome
pub fn edit_cell_source( &mut self, path: TablePath, input: Input, caller_policy: ReadPolicy, ) -> SourceEditOutcome
Decodes edited source through the inherited installed codec under explicit position, limits, caller trust, and diminished cell authority.
A rejected edit leaves the prior source unchanged.
Sourcepub fn source_face(&self, path: &TablePath) -> EncodedFace
pub fn source_face(&self, path: &TablePath) -> EncodedFace
Encodes the authored source expression under its inherited codec, position, and source-only face budget.
Sourcepub fn result_face(&self, path: &TablePath) -> EncodedFace
pub fn result_face(&self, path: &TablePath) -> EncodedFace
Encodes the current arbitrary result under its inherited codec, position, and result-only face budget.
The ordinary Value remains in the calculator regardless of whether
it has a safe bounded presentation projection.
Source§impl ExprTreeCalc
impl ExprTreeCalc
Sourcepub fn persist_derived(
&mut self,
derived: &mut DerivedTableAdapter<'_>,
) -> Result<DerivedPersistReport, DerivedSnapshotError>
pub fn persist_derived( &mut self, derived: &mut DerivedTableAdapter<'_>, ) -> Result<DerivedPersistReport, DerivedSnapshotError>
Writes graph observations, reverse edges, memos, receipts, and scheduler continuations to the derived Table.
Sourcepub fn restore_derived(
&mut self,
derived: &mut DerivedTableAdapter<'_>,
) -> Result<DerivedRestoreReport, DerivedSnapshotError>
pub fn restore_derived( &mut self, derived: &mut DerivedTableAdapter<'_>, ) -> Result<DerivedRestoreReport, DerivedSnapshotError>
Opens a valid derived graph or conservatively rebuilds it.
Missing, corrupt, incompatible, and source/control-mismatched records are deleted and treated as a cache miss. Authored source and operational control state are never changed by this operation.
Source§impl ExprTreeCalc
impl ExprTreeCalc
Sourcepub fn attach_refresh_source(
&mut self,
path: &TablePath,
source: Arc<dyn MountRefreshSource>,
) -> Result<(), RefreshError>
pub fn attach_refresh_source( &mut self, path: &TablePath, source: Arc<dyn MountRefreshSource>, ) -> Result<(), RefreshError>
Attaches an explicit refresh sampler to an existing mount.
Registration does not sample the backend. The source remains idle until
Self::refresh is called.
Sourcepub fn detach_refresh_source(
&mut self,
path: &TablePath,
) -> Option<Arc<dyn MountRefreshSource>>
pub fn detach_refresh_source( &mut self, path: &TablePath, ) -> Option<Arc<dyn MountRefreshSource>>
Detaches and returns an explicit refresh sampler.
Sourcepub fn refresh(&mut self) -> Result<RefreshReport, RefreshError>
pub fn refresh(&mut self) -> Result<RefreshReport, RefreshError>
Explicitly samples every non-watch mount and invalidates changed inputs.
Sampling completes before graph or control state is mutated. If any backend fails, the refresh is rejected atomically and no observation is advanced.
Source§impl ExprTreeCalc
impl ExprTreeCalc
Sourcepub fn set_tree_codec_policy(&mut self, patch: CodecPolicyPatch)
pub fn set_tree_codec_policy(&mut self, patch: CodecPolicyPatch)
Replaces the tree-level codec policy patch.
Sourcepub fn set_dir_codec_policy(
&mut self,
directory: TablePath,
patch: CodecPolicyPatch,
)
pub fn set_dir_codec_policy( &mut self, directory: TablePath, patch: CodecPolicyPatch, )
Replaces one directory-level codec policy patch.
Sourcepub fn set_cell_codec_policy(
&mut self,
cell: TablePath,
patch: CodecPolicyPatch,
)
pub fn set_cell_codec_policy( &mut self, cell: TablePath, patch: CodecPolicyPatch, )
Replaces one cell-level codec policy patch.
Sourcepub fn effective_codec_policy(&self, cell: &TablePath) -> EffectiveCodecPolicy
pub fn effective_codec_policy(&self, cell: &TablePath) -> EffectiveCodecPolicy
Resolves codec policy field by field from tree through ancestor directories to the selected cell.
Sourcepub fn set_tree_calc_policy(&mut self, patch: CalcPolicyPatch)
pub fn set_tree_calc_policy(&mut self, patch: CalcPolicyPatch)
Replaces the tree-level calculation policy patch.
Sourcepub fn set_dir_calc_policy(
&mut self,
directory: TablePath,
patch: CalcPolicyPatch,
)
pub fn set_dir_calc_policy( &mut self, directory: TablePath, patch: CalcPolicyPatch, )
Replaces one directory-level calculation policy patch.
Sourcepub fn set_cell_calc_policy(&mut self, cell: TablePath, patch: CalcPolicyPatch)
pub fn set_cell_calc_policy(&mut self, cell: TablePath, patch: CalcPolicyPatch)
Replaces one cell-level calculation policy patch.
Sourcepub fn effective_calc_policy(&self, cell: &TablePath) -> EffectiveCalcPolicy
pub fn effective_calc_policy(&self, cell: &TablePath) -> EffectiveCalcPolicy
Resolves tree, ancestor-directory, and cell calculation policy fields.
Replaces the tree-level authority policy patch.
Replaces one directory-level authority policy patch.
Replaces one cell-level authority policy patch.
Resolves the immutable ceiling through every allow/deny policy level.
Sourcepub fn set_codec_registry_revision(&mut self, revision: u64)
pub fn set_codec_registry_revision(&mut self, revision: u64)
Updates the observed codec registry revision.
Sourcepub fn mount(
&mut self,
path: TablePath,
resource: MountResource,
backend: BackendKind,
epoch: MountEpoch,
)
pub fn mount( &mut self, path: TablePath, resource: MountResource, backend: BackendKind, epoch: MountEpoch, )
Adds or replaces a mounted backend observation.
Sourcepub fn unmount(&mut self, path: &TablePath) -> bool
pub fn unmount(&mut self, path: &TablePath) -> bool
Removes a mounted backend observation and its refresh state.
Sourcepub fn observe_mount_epoch(&mut self, path: &TablePath, epoch: MountEpoch)
pub fn observe_mount_epoch(&mut self, path: &TablePath, epoch: MountEpoch)
Advances a mounted backend epoch.
Sourcepub fn request_cancellation(&self)
pub fn request_cancellation(&self)
Requests cancellation of the next calculation work that actually runs.
Sourcepub fn verify_cell(&mut self, path: &TablePath) -> Result<Value, CalcError>
pub fn verify_cell(&mut self, path: &TablePath) -> Result<Value, CalcError>
Pull-verifies a cell under the hard default ceilings.
Sourcepub fn verify_cell_with_limits(
&mut self,
path: &TablePath,
limits: CalcLimits,
) -> Result<Value, CalcError>
pub fn verify_cell_with_limits( &mut self, path: &TablePath, limits: CalcLimits, ) -> Result<Value, CalcError>
Pull-verifies a cell with requested limits clamped to hard ceilings.
Sourcepub fn recalculate_cell(&mut self, path: &TablePath) -> Result<Value, CalcError>
pub fn recalculate_cell(&mut self, path: &TablePath) -> Result<Value, CalcError>
Forces only this root while permitting valid dependency reuse.
Sourcepub fn recalculate_cell_with_limits(
&mut self,
path: &TablePath,
limits: CalcLimits,
) -> Result<Value, CalcError>
pub fn recalculate_cell_with_limits( &mut self, path: &TablePath, limits: CalcLimits, ) -> Result<Value, CalcError>
Forces only this root under explicit hard-clamped limits.
Sourcepub fn recalculate_recursive(
&mut self,
path: &TablePath,
) -> Result<Value, CalcError>
pub fn recalculate_recursive( &mut self, path: &TablePath, ) -> Result<Value, CalcError>
Forces this root and every reachable calculated dependency.
Sourcepub fn calculate_cells(
&mut self,
roots: impl IntoIterator<Item = TablePath>,
mode: CalcRequestMode,
limits: CalcLimits,
) -> DirectedCalcReport
pub fn calculate_cells( &mut self, roots: impl IntoIterator<Item = TablePath>, mode: CalcRequestMode, limits: CalcLimits, ) -> DirectedCalcReport
Runs one stable multi-root directed request through the shared engine.
Sourcepub fn watch(&mut self, buffer_policy: BufferPolicy) -> CalcWatch
pub fn watch(&mut self, buffer_policy: BufferPolicy) -> CalcWatch
Opens one standard bounded stream endpoint for progress and changes.
Sourcepub fn cancel_request(&mut self, request_id: RequestId) -> bool
pub fn cancel_request(&mut self, request_id: RequestId) -> bool
Cancels queued automatic work with this request id.
Sourcepub fn current_cell(&self, path: &TablePath) -> Result<Value, CalcError>
pub fn current_cell(&self, path: &TablePath) -> Result<Value, CalcError>
Reads only the current committed result.
A failed or cancelled recalculation never falls back to last-good.
Sourcepub fn last_good_cell(&self, path: &TablePath) -> Option<LastGoodValue>
pub fn last_good_cell(&self, path: &TablePath) -> Option<LastGoodValue>
Returns the retained historical success, explicitly labelled
last-good.
Sourcepub fn current_is_volatile(&self, path: &TablePath) -> bool
pub fn current_is_volatile(&self, path: &TablePath) -> bool
Returns whether the current successful result is noncanonical and must therefore be treated as volatile.
Sourcepub fn cell_revision(&self, path: &TablePath) -> Option<u64>
pub fn cell_revision(&self, path: &TablePath) -> Option<u64>
Returns the current incremental memo revision.
Sourcepub fn cell_fingerprint(&self, path: &TablePath) -> Option<ValueFingerprint>
pub fn cell_fingerprint(&self, path: &TablePath) -> Option<ValueFingerprint>
Returns the current incremental fingerprint.
Sourcepub fn receipt(&self, path: &TablePath) -> Option<CalcReceipt>
pub fn receipt(&self, path: &TablePath) -> Option<CalcReceipt>
Returns the latest bounded immutable calculation receipt.
Sourcepub fn explain(&self, path: &TablePath) -> CalcExplanation
pub fn explain(&self, path: &TablePath) -> CalcExplanation
Explains current state without evaluating or mutating the graph.
Sourcepub fn run_automatic(
&mut self,
budget: AutomaticBudget,
now_ms: u64,
) -> AutomaticRun
pub fn run_automatic( &mut self, budget: AutomaticBudget, now_ms: u64, ) -> AutomaticRun
Runs a bounded amount of ready automatic work.
Sourcepub fn continue_automatic(
&mut self,
continuation: AutomaticContinuation,
budget: AutomaticBudget,
now_ms: u64,
) -> Result<AutomaticRun, CalcError>
pub fn continue_automatic( &mut self, continuation: AutomaticContinuation, budget: AutomaticBudget, now_ms: u64, ) -> Result<AutomaticRun, CalcError>
Resumes a prior automatic queue continuation.
Sourcepub fn automatic_queue_snapshot(&self) -> AutomaticQueueSnapshot
pub fn automatic_queue_snapshot(&self) -> AutomaticQueueSnapshot
Snapshots all deterministic queue state needed for restart.
Sourcepub fn restore_automatic_queue(
&mut self,
snapshot: AutomaticQueueSnapshot,
) -> Result<(), CalcError>
pub fn restore_automatic_queue( &mut self, snapshot: AutomaticQueueSnapshot, ) -> Result<(), CalcError>
Restores a deterministic queue snapshot, rejecting duplicate cells.
Source§impl ExprTreeCalc
impl ExprTreeCalc
Sourcepub fn with_context_factory<F>(factory: F) -> Self
pub fn with_context_factory<F>(factory: F) -> Self
Creates a calculator from a fresh-context factory.
The factory may install loadable libraries, lexical values, functions, macros, tables, and directories. It is invoked with no calculator lock held.
Sourcepub fn set_wall_clock<F>(&mut self, clock: F)
pub fn set_wall_clock<F>(&mut self, clock: F)
Replaces the optional human wall-clock observation source.
Logical ticks and revisions remain the only freshness authority.
Returns the immutable capability ceiling captured when this tree opened.
Sourcepub fn set_cell(&mut self, path: TablePath, source: Expr)
pub fn set_cell(&mut self, path: TablePath, source: Expr)
Installs or replaces an ordinary expression source.
Sourcepub fn remove_cell(&mut self, path: &TablePath)
pub fn remove_cell(&mut self, path: &TablePath)
Removes a cell source while retaining an explicit missing-value query.
Sourcepub fn move_cell(&mut self, from: &TablePath, to: TablePath)
pub fn move_cell(&mut self, from: &TablePath, to: TablePath)
Moves an ordinary source and invalidates both namespace locations.
Sourcepub fn bind_name(&mut self, name: impl Into<String>)
pub fn bind_name(&mut self, name: impl Into<String>)
Binds a lexical name to a diagnostic string value.
This compatibility helper keeps a name ahead of tree lookup. New code
should prefer Self::bind_value.
Sourcepub fn bind_value(&mut self, name: Symbol, value: Value)
pub fn bind_value(&mut self, name: Symbol, value: Value)
Binds an arbitrary ordinary SIM value ahead of tree-name lookup.
Sourcepub fn cell_dependencies(
&mut self,
path: &TablePath,
) -> Result<Vec<(CalcQuery, ObservationKind)>, IncrementalError<CalcQuery>>
pub fn cell_dependencies( &mut self, path: &TablePath, ) -> Result<Vec<(CalcQuery, ObservationKind)>, IncrementalError<CalcQuery>>
Returns the dependency observations for a cell in deterministic order.