Enum cursive::event::EventResult [−][src]
Expand description
Answer to an event notification. The event can be consumed or ignored.
Variants
The event was ignored. The parent can keep handling it.
The event was consumed. An optional callback to run is attached.
Implementations
Convenient method to create Consumed(Some(f))
Convenient method to create Consumed(Some(f))
After being called once, the callback will become a no-op.
Convenient method to create Consumed(None)
Returns true
if self
is EventResult::Consumed
.
Returns true
if self
contains a callback.
Process this result if it is a callback.
Does nothing otherwise.
Returns self
if it is not EventResult::Ignored
, otherwise returns f()
.
Returns an event result that combines self
and other
.
Auto Trait Implementations
impl !RefUnwindSafe for EventResult
impl !Send for EventResult
impl !Sync for EventResult
impl Unpin for EventResult
impl !UnwindSafe for EventResult