pub trait StopPolicy: Send + Sync {
// Required methods
fn id(&self) -> &str;
fn evaluate(&self, input: &StopPolicyInput<'_>) -> Option<StoppedReason>;
}Expand description
Stop-policy contract used by super::StopPolicyPlugin.
Required Methods§
Sourcefn evaluate(&self, input: &StopPolicyInput<'_>) -> Option<StoppedReason>
fn evaluate(&self, input: &StopPolicyInput<'_>) -> Option<StoppedReason>
Evaluate stop decision. Return Some(StoppedReason) to terminate.