pub trait StopCondition: Send + Sync {
// Required method
fn should_stop<'a>(&'a self, steps: &'a [StepResult]) -> BoxFuture<'a, bool>;
}Expand description
Decides after each step whether the loop stops.
Conditions configured on a call are combined with any-of semantics.
Implemented for every Fn(&[StepResult]) -> bool closure.
Required Methods§
Sourcefn should_stop<'a>(&'a self, steps: &'a [StepResult]) -> BoxFuture<'a, bool>
fn should_stop<'a>(&'a self, steps: &'a [StepResult]) -> BoxFuture<'a, bool>
Returns true when the loop must stop after steps.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".