Skip to main content

Screencast

Struct Screencast 

Source
pub struct Screencast { /* private fields */ }
Expand description

Live frame-streaming entry point. Obtained from Page::screencast.

Implementations§

Source§

impl Screencast

Source

pub async fn start(&self, options: ScreencastStartOptions) -> Result<()>

Begin streaming. Frames arrive on handlers registered via on_frame; register them before calling start so no frames are missed.

If options.path is set, the screencast is also recorded to disk; the file is written when stop is called.

Source

pub async fn stop(&self) -> Result<()>

Stop the screencast. If start was called with a path, the recorded file is written to that path before this call returns.

Source

pub fn on_frame<F, Fut>(&self, handler: F)
where F: Fn(ScreencastFrame) -> Fut + Send + Sync + 'static, Fut: Future<Output = Result<()>> + Send + 'static,

Register a handler for incoming frames. Multiple handlers may be registered; they fire in order for each frame.

Source

pub async fn show_actions(&self, options: ShowActionsOptions) -> Result<()>

Overlay action labels on the streamed frames as actions occur. Pair with hide_actions to stop.

Source

pub async fn hide_actions(&self) -> Result<()>

Stop overlaying action labels. No-op if not currently shown.

Source

pub async fn show_chapter( &self, title: &str, options: ChapterOptions, ) -> Result<()>

Show a chapter card with the given title (and optional description). Useful for splitting a session into named phases for an agent’s video log.

Source

pub async fn show_overlay( &self, html: &str, options: ShowOverlayOptions, ) -> Result<OverlayId>

Render arbitrary HTML as an overlay. Returns an OverlayId you can pass to remove_overlay to dismiss it early; otherwise it dismisses itself after options.duration (if set) or stays until removed.

Source

pub async fn remove_overlay(&self, id: OverlayId) -> Result<()>

Remove an overlay previously created via show_overlay. Idempotent.

Source

pub async fn set_overlay_visible(&self, visible: bool) -> Result<()>

Toggle visibility of all currently-shown overlays without removing them. Useful for hiding overlays during a section the agent considers “noise” and re-showing them later.

Trait Implementations§

Source§

impl Clone for Screencast

Source§

fn clone(&self) -> Screencast

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more