pub struct MouseEvent {
pub kind: MouseKind,
pub x: u32,
pub y: u32,
pub modifiers: KeyModifiers,
}Expand description
A mouse event with position and kind.
Coordinates are zero-based terminal columns (x) and rows (y).
Mouse events are only produced when mouse: true is set in
crate::RunConfig.
Fields§
§kind: MouseKindThe type of mouse action that occurred.
x: u32Column (horizontal position), zero-based.
y: u32Row (vertical position), zero-based.
modifiers: KeyModifiersModifier keys held at the time of the event.
Trait Implementations§
Source§impl Clone for MouseEvent
impl Clone for MouseEvent
Source§fn clone(&self) -> MouseEvent
fn clone(&self) -> MouseEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MouseEvent
impl Debug for MouseEvent
Source§impl PartialEq for MouseEvent
impl PartialEq for MouseEvent
impl Eq for MouseEvent
impl StructuralPartialEq for MouseEvent
Auto Trait Implementations§
impl Freeze for MouseEvent
impl RefUnwindSafe for MouseEvent
impl Send for MouseEvent
impl Sync for MouseEvent
impl Unpin for MouseEvent
impl UnsafeUnpin for MouseEvent
impl UnwindSafe for MouseEvent
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