Skip to main content

IterSnapshot

Trait IterSnapshot 

Source
pub trait IterSnapshot: Any {
    // Required methods
    fn iter(&self) -> i32;
    fn mu(&self) -> Number;
    fn block(&self, name: &str) -> Option<Vec<Number>>;
    fn as_any(&self) -> &dyn Any;
}
Expand description

An opaque, readable snapshot of a solver’s primal-dual state at one iteration, returned by DebugState::snapshot and replayed by DebugState::restore.

The reader methods (iter / mu / block) let the REPL diff two captured points generically; as_any lets the originating solver downcast back to its concrete snapshot type to restore it.

Required Methods§

Source

fn iter(&self) -> i32

Iteration index this snapshot was taken at.

Source

fn mu(&self) -> Number

Barrier parameter μ at the snapshot.

Source

fn block(&self, name: &str) -> Option<Vec<Number>>

A named iterate block at the snapshot, if present.

Source

fn as_any(&self) -> &dyn Any

Downcast handle for the originating solver’s restore.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§