pub struct AsciicastRecorder<W: Write> { /* private fields */ }Expand description
Records terminal output in asciicast v2 format.
Implementations§
Source§impl<W: Write> AsciicastRecorder<W>
impl<W: Write> AsciicastRecorder<W>
Sourcepub fn with_writer(
output: W,
width: u16,
height: u16,
timestamp: i64,
) -> Result<Self>
pub fn with_writer( output: W, width: u16, height: u16, timestamp: i64, ) -> Result<Self>
Create a recorder that writes to the provided writer.
timestamp is seconds since UNIX epoch used in the asciicast header.
Sourcepub fn record_output(&mut self, data: &[u8]) -> Result<()>
pub fn record_output(&mut self, data: &[u8]) -> Result<()>
Record terminal output bytes.
Sourcepub fn record_input(&mut self, data: &[u8]) -> Result<()>
pub fn record_input(&mut self, data: &[u8]) -> Result<()>
Record terminal input bytes (optional).
Sourcepub const fn event_count(&self) -> u64
pub const fn event_count(&self) -> u64
Number of events recorded so far.
Trait Implementations§
Auto Trait Implementations§
impl<W> Freeze for AsciicastRecorder<W>where
W: Freeze,
impl<W> RefUnwindSafe for AsciicastRecorder<W>where
W: RefUnwindSafe,
impl<W> Send for AsciicastRecorder<W>where
W: Send,
impl<W> Sync for AsciicastRecorder<W>where
W: Sync,
impl<W> Unpin for AsciicastRecorder<W>where
W: Unpin,
impl<W> UnsafeUnpin for AsciicastRecorder<W>where
W: UnsafeUnpin,
impl<W> UnwindSafe for AsciicastRecorder<W>where
W: UnwindSafe,
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