pub struct PartialCompilationResult {
pub graphs: Vec<Option<EinsumGraph>>,
pub diagnostics: DiagnosticCollector,
pub strategy: RecoveryStrategy,
pub aborted: bool,
pub aborted_at: Option<usize>,
}Expand description
Result returned by TolerantCompiler::compile_program.
The graphs vector has exactly the same length as the input slice.
graphs[i] == None iff expression i was skipped due to a blocking
diagnostic (Error or Fatal) or because the program was aborted while
processing expression i or earlier.
Fields§
§graphs: Vec<Option<EinsumGraph>>Per-expression compilation output, aligned with the input slice.
diagnostics: DiagnosticCollectorCollected diagnostics, in insertion (i.e. expression) order.
strategy: RecoveryStrategyThe recovery strategy that produced this result.
aborted: booltrue iff the driver stopped early (AbortOnAny / SkipOnFatal hit a
blocker). Expressions after aborted_at have None graphs.
aborted_at: Option<usize>Index at which the driver aborted (only meaningful when aborted is
true).
Implementations§
Source§impl PartialCompilationResult
impl PartialCompilationResult
Sourcepub fn success_count(&self) -> usize
pub fn success_count(&self) -> usize
Number of expressions that successfully produced a graph.
Sourcepub fn failure_count(&self) -> usize
pub fn failure_count(&self) -> usize
Number of expressions that failed to produce a graph.
Sourcepub fn is_all_success(&self) -> bool
pub fn is_all_success(&self) -> bool
true if every expression produced a graph.
Sourcepub fn successes(&self) -> impl Iterator<Item = (usize, &EinsumGraph)>
pub fn successes(&self) -> impl Iterator<Item = (usize, &EinsumGraph)>
Iterate successful (index, &graph) pairs.
Trait Implementations§
Source§impl Clone for PartialCompilationResult
impl Clone for PartialCompilationResult
Source§fn clone(&self) -> PartialCompilationResult
fn clone(&self) -> PartialCompilationResult
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more