pub trait Cancelation {
// Required method
fn should_cancel(&self) -> bool;
}Expand description
Provides a means for cancelling long-running operations.
Reasonable implementation of this trait should ensure that once should_cancel returns
true, all future calls to should_cancel should also return true.