pub struct EventTrigger { /* private fields */ }
Expand description

A trigger that only selects some types of events.

It is meant to be stored in views.

Implementations

Create a new EventTrigger using the given function as filter.

Create a new EventTrigger.

Check if this trigger has the given tag.

Examples
use cursive_core::event::{Event, EventTrigger};

let event = Event::CtrlChar('c');
let trigger: EventTrigger = event.clone().into();
assert!(
    trigger.has_tag(&event),
    "Trigger does not recognize its own tag."
);

Checks if this trigger applies to the given Event.

Returns an EventTrigger that only accepts arrow keys.

Only bare arrow keys without modifiers (Shift, Ctrl, Alt) will be accepted.

Returns an EventTrigger that only accepts mouse events.

Returns an EventTrigger that accepts any event.

Returns an EventTrigger that doesn’t accept any event.

Returns an EventTrigger that applies if either self or other applies.

Trait Implementations

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

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.