pub struct RecorderHandle { /* private fields */ }Expand description
A cheap, cloneable handle onto an InputRecorder’s captured state.
Exists so a call stack that doesn’t own the recorder itself – most notably
install_panic_recorder, which runs from inside a panic
hook – can still start/pause/stop it or save whatever it has captured so far. Backed by
Arc<Mutex<..>>: cloning shares the same underlying recording, it does not fork one.
Implementations§
Source§impl RecorderHandle
impl RecorderHandle
Sourcepub fn start(&self)
pub fn start(&self)
(Re)starts recording. A no-op if already active. The gap since the previous event (or
since pause, if that’s why recording stopped) is not itself recorded as
a delay: the next event’s delay is measured from when it actually arrives.
Sourcepub fn pause(&self)
pub fn pause(&self)
Stops appending new events, without discarding what’s already captured. Recording resumes
on the next start.
Sourcepub fn snapshot(&self) -> InputRecording
pub fn snapshot(&self) -> InputRecording
A snapshot of everything captured so far.
Sourcepub fn stop(&self) -> InputRecording
pub fn stop(&self) -> InputRecording
pauses recording and returns everything captured so far.
Trait Implementations§
Source§impl Clone for RecorderHandle
impl Clone for RecorderHandle
Source§fn clone(&self) -> RecorderHandle
fn clone(&self) -> RecorderHandle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for RecorderHandle
impl RefUnwindSafe for RecorderHandle
impl Send for RecorderHandle
impl Sync for RecorderHandle
impl Unpin for RecorderHandle
impl UnsafeUnpin for RecorderHandle
impl UnwindSafe for RecorderHandle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.