pub struct RecordingHandle { /* private fields */ }Expand description
An in-flight screencast. Dropping it stops the frame writer (and, when
this recording owns one, its pump) but does NOT write a manifest — call
RecordingHandle::stop for a usable recording.
Implementations§
Source§impl RecordingHandle
impl RecordingHandle
Sourcepub async fn stop(self) -> Result<Recording, BrowserError>
pub async fn stop(self) -> Result<Recording, BrowserError>
Stop the screencast and write the ffmpeg concat manifest.
Trait Implementations§
Source§impl Drop for RecordingHandle
impl Drop for RecordingHandle
Source§fn drop(&mut self)
fn drop(&mut self)
Dropping a handle without RecordingHandle::stop must not leave the
recording running.
Dropping a tokio JoinHandle detaches its task, and this one owns
the moved frame receiver — so it kept draining frames and writing
frame-NNNNNN.jpg into the recording directory indefinitely, and
because its receiver never dropped, the fan-out consumer above was
never pruned either: “consumers empty” never tripped and the live
screencast stayed armed for the life of the process. Unbounded disk
growth plus permanently-armed capture, from a plain drop.
The owned pump (when there is one) needs nothing here — ScreencastPump
has its own Drop. A borrowed one is deliberately left alone: it
belongs to somebody else, and stopping it would cut off its other
consumers.
Auto Trait Implementations§
impl !Freeze for RecordingHandle
impl !RefUnwindSafe for RecordingHandle
impl !UnwindSafe for RecordingHandle
impl Send for RecordingHandle
impl Sync for RecordingHandle
impl Unpin for RecordingHandle
impl UnsafeUnpin for RecordingHandle
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more