Enum cursive::event::EventResult [] [src]

pub enum EventResult {
    Ignored,
    Consumed(Option<Callback>),
}

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 optionnal callback to run is attached.

Methods

impl EventResult
[src]

[src]

Convenient method to create Consumed(Some(f))

[src]

Returns true if self is EventResult::Consumed.

[src]

Returns true if self contains a callback.

[src]

Process this result if it is a callback.

Does nothing otherwise.

[src]

Returns self if it is not Event::Ignored, otherwise returns f().

Trait Implementations

Auto Trait Implementations

impl !Send for EventResult

impl !Sync for EventResult