pub struct ScreencastScope { /* private fields */ }Expand description
Scoped guard managing an active screencast session.
Created by BrowserSession::start_screencast. Frames are received
via next_frame. On drop or explicit
stop, screencast is disabled for the session.
Implementations§
Source§impl ScreencastScope
impl ScreencastScope
Sourcepub async fn next_frame(&mut self) -> Option<ScreencastFrame>
pub async fn next_frame(&mut self) -> Option<ScreencastFrame>
Wait for the next screencast frame matching this session.
Returns None if the screencast channel is closed or exhausted.
Sourcepub fn stats(&self) -> ScreencastStats
pub fn stats(&self) -> ScreencastStats
Return current frame delivery statistics.
Sourcepub async fn stop(self) -> BrowserResult<ScreencastStats>
pub async fn stop(self) -> BrowserResult<ScreencastStats>
Stop the screencast and return final delivery statistics.
Trait Implementations§
Source§impl Drop for ScreencastScope
impl Drop for ScreencastScope
Auto Trait Implementations§
impl Freeze for ScreencastScope
impl RefUnwindSafe for ScreencastScope
impl Send for ScreencastScope
impl Sync for ScreencastScope
impl Unpin for ScreencastScope
impl UnsafeUnpin for ScreencastScope
impl UnwindSafe for ScreencastScope
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
Converts
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>
Converts
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