pub struct EventTrigger { /* fields omitted */ }
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

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

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.