#[non_exhaustive]pub enum ComponentEvent {
Key(String),
Paste(String),
Resize {
columns: u16,
rows: u16,
},
Tick,
Mouse {
kind: String,
column: u16,
row: u16,
},
Link(String),
}Expand description
An event for a PluginComponent.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Key(String)
A key, by name: a, A, enter, down, space, tab,
backspace, f5, with ctrl+, alt+ and shift+ before it, in
that order (ctrl+shift+left, shift+tab). A key that does one of
the component’s bindings arrives as
the first key declared for that action, spelled as declared (esc
stays esc), even when the user rebound it.
Paste(String)
Text pasted at once.
Resize
The terminal is now this size.
Tick
The component’s tick interval passed.
Mouse
The mouse, in the component’s own view (0-based), when it asked for
it with mouse.
Link(String)
A click on a hyperlink in the component’s view: its URL.
Implementations§
Trait Implementations§
Source§impl Clone for ComponentEvent
impl Clone for ComponentEvent
Source§impl Debug for ComponentEvent
impl Debug for ComponentEvent
impl Eq for ComponentEvent
Source§impl PartialEq for ComponentEvent
impl PartialEq for ComponentEvent
impl StructuralPartialEq for ComponentEvent
Auto Trait Implementations§
impl Freeze for ComponentEvent
impl RefUnwindSafe for ComponentEvent
impl Send for ComponentEvent
impl Sync for ComponentEvent
impl Unpin for ComponentEvent
impl UnsafeUnpin for ComponentEvent
impl UnwindSafe for ComponentEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.