pub struct CaptureHandle { /* private fields */ }Expand description
RAII handle for an armed key-capture session.
Dropping the handle cancels the capture if it has not already
fired — the pattern matches
ObserverHandle elsewhere in the
framework. Widgets that arm a capture should hold onto the handle
(typically in their own state) so destruction of the widget tears
the capture down cleanly.
The handle refers to its own slot, not whatever capture is
currently armed; calling begin_key_capture twice creates two
independent slots. Dropping the old handle cancels only the old
slot (already orphaned by the new call) — it cannot race-cancel a
newer capture.
Implementations§
Trait Implementations§
Source§impl Debug for CaptureHandle
impl Debug for CaptureHandle
Source§impl Drop for CaptureHandle
impl Drop for CaptureHandle
Auto Trait Implementations§
impl !RefUnwindSafe for CaptureHandle
impl !Send for CaptureHandle
impl !Sync for CaptureHandle
impl !UnwindSafe for CaptureHandle
impl Freeze for CaptureHandle
impl Unpin for CaptureHandle
impl UnsafeUnpin for CaptureHandle
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