pub trait Stoppable {
// Required methods
fn stop_requested(&self) -> bool;
fn request_stop(&mut self);
fn discard_stop_request(&mut self);
}
Expand description
A trait for types that want to expose a stop API
Required Methods§
Sourcefn stop_requested(&self) -> bool
fn stop_requested(&self) -> bool
Check if stop is requested
Sourcefn request_stop(&mut self)
fn request_stop(&mut self)
Request to stop
Sourcefn discard_stop_request(&mut self)
fn discard_stop_request(&mut self)
Discard the stop request