pub struct Screencast { /* private fields */ }Expand description
Shared screencast state. Thread-safe; mutex locks are short-lived and recover from poisoning.
Implementations§
Source§impl Screencast
impl Screencast
Sourcepub fn start(
&self,
interval_ms: u64,
max_frames: usize,
label: Option<String>,
) -> u64
pub fn start( &self, interval_ms: u64, max_frames: usize, label: Option<String>, ) -> u64
Begin a new trace: clears frames, records settings, returns the generation token the capture task must check to know it is current.
Sourcepub fn generation(&self) -> u64
pub fn generation(&self) -> u64
The current generation token (a capture task is stale if it differs).
Sourcepub fn interval_ms(&self) -> u64
pub fn interval_ms(&self) -> u64
Configured capture interval in milliseconds.
Sourcepub fn push_frame(&self, t_ms: u64, data_b64: String)
pub fn push_frame(&self, t_ms: u64, data_b64: String)
Append a frame, enforcing the max_frames ring-buffer cap.
Sourcepub fn frame_count(&self) -> usize
pub fn frame_count(&self) -> usize
Number of frames currently buffered.
Sourcepub fn frames(&self, limit: usize) -> Vec<TraceFrame>
pub fn frames(&self, limit: usize) -> Vec<TraceFrame>
Return up to limit of the most recent frames (or all if limit is 0).
Sourcepub fn frame_timestamps(&self) -> Vec<u64>
pub fn frame_timestamps(&self) -> Vec<u64>
Frame timestamps (ms since start) without the image payloads.
Trait Implementations§
Source§impl Debug for Screencast
impl Debug for Screencast
Auto Trait Implementations§
impl !Freeze for Screencast
impl RefUnwindSafe for Screencast
impl Send for Screencast
impl Sync for Screencast
impl Unpin for Screencast
impl UnsafeUnpin for Screencast
impl UnwindSafe for Screencast
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