pub struct NativeRecording { /* private fields */ }Expand description
Owned target-bound recorder. Stop, read to EOF, then close to release Chrome’s temporary stream storage. Dropping schedules bounded best-effort cancellation. No file policy, transcoding, fallback engine, or whole-video buffering is used.
Implementations§
Source§impl NativeRecording
impl NativeRecording
Sourcepub async fn stop(&self) -> Result<(), RecordingError>
pub async fn stop(&self) -> Result<(), RecordingError>
Stop capture exactly once and make the native MP4 stream readable. Cancellation of this waiter does not cancel the owned native transition.
Sourcepub async fn read_chunk(&self) -> Result<RecordingChunk, RecordingError>
pub async fn read_chunk(&self) -> Result<RecordingChunk, RecordingError>
Read at most 64 KiB. Call only after stop; EOF remains explicit on repeat. Overlapping reads are rejected until the preceding chunk is delivered. A cancelled read waiter cancels the recorder: consumed bytes cannot safely be recovered without buffering, so a later read cannot silently skip them.
Sourcepub async fn close(&self) -> Result<(), RecordingError>
pub async fn close(&self) -> Result<(), RecordingError>
Stop if necessary, close native stream storage, and release the target. Cleanup is bounded; failed acknowledgements retain the target reservation.
Sourcepub async fn cancel(&self) -> Result<(), RecordingError>
pub async fn cancel(&self) -> Result<(), RecordingError>
Discard capture with the same truthful, bounded cleanup as close.
Sourcepub async fn wait_for_failure(&self) -> RecordingError
pub async fn wait_for_failure(&self) -> RecordingError
Wait for target/session loss or connection failure while capture is running.