pub trait Event: 'static {
fn cancellable(&self) -> bool { ... }
fn cancelled(&self) -> bool { ... }
fn set_cancelled(&mut self, cancel: bool) { ... }
}
Expand description
Basic trait for defining an event.
Provided Methods
sourcefn cancellable(&self) -> bool
fn cancellable(&self) -> bool
Returns whether this event is cancellable.
When this is true, cancelled
and cancel
should also be implemented.
Note: While this method does take a &self
, it’s a logic error for an event’s
cancellability to change based on its value. The &self
is just for trait objectification.
You have been warned!