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

pub enum EventResult {
    Ignored,
    Consumed(Option<Callback>),
}
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.

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

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Calls the given closure and return the result. Read more

Calls the given closure on self.

Calls the given closure on self.

Calls the given closure if condition == true.