pub struct MouseCaptureGuard { /* private fields */ }Expand description
RAII guard that enables terminal mouse-event reporting.
While this guard is alive, mouse click / drag / wheel events arrive
via the crossterm event stream as crossterm::event::Event::Mouse.
On drop, mouse capture is disabled so the terminal emulator’s own
selection + copy bindings work again once rtcom exits.
Note: with capture enabled, the terminal’s native text selection
typically does not work on bare click-drag — most emulators
(xterm, gnome-terminal, kitty, alacritty, iterm2) treat Shift+drag
as a bypass, returning native selection to the user on demand. That
is the v0.2 workflow for copying text; a native rtcom selection
implementation ships in v0.2.1.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MouseCaptureGuard
impl RefUnwindSafe for MouseCaptureGuard
impl Send for MouseCaptureGuard
impl Sync for MouseCaptureGuard
impl Unpin for MouseCaptureGuard
impl UnsafeUnpin for MouseCaptureGuard
impl UnwindSafe for MouseCaptureGuard
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more