pub struct Recorder { /* private fields */ }Expand description
A session recorder.
Implementations§
Source§impl Recorder
impl Recorder
Sourcepub const fn with_max_duration(self, duration: Duration) -> Self
pub const fn with_max_duration(self, duration: Duration) -> Self
Set maximum duration.
Sourcepub const fn with_max_events(self, count: usize) -> Self
pub const fn with_max_events(self, count: usize) -> Self
Set maximum events.
Sourcepub const fn is_recording(&self) -> bool
pub const fn is_recording(&self) -> bool
Check if recording is active.
Sourcepub fn record_output(&self, data: &[u8])
pub fn record_output(&self, data: &[u8])
Record an output event.
Sourcepub fn record_input(&self, data: &[u8])
pub fn record_input(&self, data: &[u8])
Record an input event.
Sourcepub fn record_resize(&self, cols: u16, rows: u16)
pub fn record_resize(&self, cols: u16, rows: u16)
Record a resize event.
Sourcepub fn add_marker(&self, label: &str)
pub fn add_marker(&self, label: &str)
Add a marker.
Sourcepub fn transcript(&self) -> Arc<Mutex<Transcript>>
pub fn transcript(&self) -> Arc<Mutex<Transcript>>
Get the transcript.
Sourcepub fn into_transcript(self) -> Transcript
pub fn into_transcript(self) -> Transcript
Take the transcript, consuming the recorder.
Sourcepub fn event_count(&self) -> usize
pub fn event_count(&self) -> usize
Get event count.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Recorder
impl RefUnwindSafe for Recorder
impl Send for Recorder
impl Sync for Recorder
impl Unpin for Recorder
impl UnwindSafe for Recorder
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