[−][src]Struct cursive::event::EventTrigger
A trigger that only selects some types of events.
Methods
impl EventTrigger[src]
pub fn from_fn<F>(f: F) -> Self where
F: 'static + Fn(&Event) -> bool, [src]
F: 'static + Fn(&Event) -> bool,
Create a new EventTrigger using the given function as filter.
pub fn apply(&self, event: &Event) -> bool[src]
Checks if this trigger applies to the given Event.
pub fn arrows() -> Self[src]
Returns an EventTrigger that only accepts arrow keys.
Only bare arrow keys without modifiers (Shift, Ctrl, Alt) will be accepted.
pub fn mouse() -> Self[src]
Returns an EventTrigger that only accepts mouse events.
pub fn any() -> Self[src]
Returns an EventTrigger that accepts any event.
pub fn none() -> Self[src]
Returns an EventTrigger that doesn't accept any event.
pub fn or<O>(self, other: O) -> Self where
O: Into<EventTrigger>, [src]
O: Into<EventTrigger>,
Returns an EventTrigger that applies if either self or other applies.
Trait Implementations
impl From<Event> for EventTrigger[src]
impl From<char> for EventTrigger[src]
impl From<Key> for EventTrigger[src]
impl<F> From<F> for EventTrigger where
F: 'static + Fn(&Event) -> bool, [src]
F: 'static + Fn(&Event) -> bool,
Auto Trait Implementations
impl !Send for EventTrigger
impl !Sync for EventTrigger
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> From for T[src]
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.