Enum cursive_core::event::EventResult
source ·
[−]Expand description
Answer to an event notification. The event can be consumed or ignored.
Variants
Ignored
The event was ignored. The parent can keep handling it.
Consumed(Option<Callback>)
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.
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()
.