pub trait Quota: Send + Sync {
// Required method
fn is_reached(&self) -> bool;
}
Expand description
Specifies a computational quota for executions. The main purpose is to allow to stop algorithm in reaction to external events such as user cancellation, timer, etc.
Required Methods§
sourcefn is_reached(&self) -> bool
fn is_reached(&self) -> bool
Returns true when computation should be stopped.