pub struct CastClient { /* private fields */ }Expand description
Client for Cast domain commands.
Implementations§
Source§impl CastClient
impl CastClient
Sourcepub async fn enable(
&self,
params: EnableParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn enable( &self, params: EnableParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Starts observing for sinks that can be used for tab mirroring, and if set, sinks compatible with |presentationUrl| as well. When sinks are found, a |sinksUpdated| event is fired. Also starts observing for issue messages. When an issue is added or removed, an |issueUpdated| event is fired.
Sourcepub async fn disable(&self, session_id: Option<&str>) -> Result<Value, CdpError>
pub async fn disable(&self, session_id: Option<&str>) -> Result<Value, CdpError>
Stops observing for sinks and issues.
Sourcepub async fn set_sink_to_use(
&self,
params: SetSinkToUseParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn set_sink_to_use( &self, params: SetSinkToUseParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Sets a sink to be used when the web page requests the browser to choose a sink via Presentation API, Remote Playback API, or Cast SDK.
Sourcepub async fn start_desktop_mirroring(
&self,
params: StartDesktopMirroringParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn start_desktop_mirroring( &self, params: StartDesktopMirroringParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Starts mirroring the desktop to the sink.
Sourcepub async fn start_tab_mirroring(
&self,
params: StartTabMirroringParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn start_tab_mirroring( &self, params: StartTabMirroringParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Starts mirroring the tab to the sink.
Sourcepub async fn stop_casting(
&self,
params: StopCastingParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn stop_casting( &self, params: StopCastingParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Stops the active Cast session on the sink.
Auto Trait Implementations§
impl Freeze for CastClient
impl !RefUnwindSafe for CastClient
impl Send for CastClient
impl Sync for CastClient
impl Unpin for CastClient
impl UnsafeUnpin for CastClient
impl !UnwindSafe for CastClient
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