pub trait StopCondition: Send + Sync {
// Required method
fn check(&self, snapshot: &RunSnapshot) -> Option<String>;
}Expand description
A custom stop rule, checked with the built-in limits at the top of each
turn. Return Some(reason) to end the run. Closures implement it.
Required Methods§
fn check(&self, snapshot: &RunSnapshot) -> Option<String>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".