rustenium_cdp_definitions/browser_protocol/cast/
events.rs1use serde::{Deserialize, Serialize};
2#[doc = "This is fired whenever the list of available sinks changes. A sink is a\ndevice or a software surface that you can cast to.\n[sinksUpdated](https://chromedevtools.github.io/devtools-protocol/tot/Cast/#event-sinksUpdated)"]
3#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4pub struct SinksUpdatedParams {
5 #[serde(rename = "sinks")]
6 #[serde(skip_serializing_if = "Vec::is_empty")]
7 pub sinks: Vec<super::types::Sink>,
8}
9#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10pub enum SinksUpdatedMethod {
11 #[serde(rename = "Cast.sinksUpdated")]
12 SinksUpdated,
13}
14#[doc = "This is fired whenever the list of available sinks changes. A sink is a\ndevice or a software surface that you can cast to.\n[sinksUpdated](https://chromedevtools.github.io/devtools-protocol/tot/Cast/#event-sinksUpdated)"]
15#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
16pub struct SinksUpdated {
17 pub method: SinksUpdatedMethod,
18 pub params: SinksUpdatedParams,
19}
20impl SinksUpdated {
21 pub const IDENTIFIER: &'static str = "Cast.sinksUpdated";
22 pub fn identifier(&self) -> &'static str {
23 Self::IDENTIFIER
24 }
25}
26#[doc = "This is fired whenever the outstanding issue/error message changes.\n|issueMessage| is empty if there is no issue.\n[issueUpdated](https://chromedevtools.github.io/devtools-protocol/tot/Cast/#event-issueUpdated)"]
27#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
28pub struct IssueUpdatedParams {
29 #[serde(rename = "issueMessage")]
30 pub issue_message: String,
31}
32#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
33pub enum IssueUpdatedMethod {
34 #[serde(rename = "Cast.issueUpdated")]
35 IssueUpdated,
36}
37#[doc = "This is fired whenever the outstanding issue/error message changes.\n|issueMessage| is empty if there is no issue.\n[issueUpdated](https://chromedevtools.github.io/devtools-protocol/tot/Cast/#event-issueUpdated)"]
38#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
39pub struct IssueUpdated {
40 pub method: IssueUpdatedMethod,
41 pub params: IssueUpdatedParams,
42}
43impl IssueUpdated {
44 pub const IDENTIFIER: &'static str = "Cast.issueUpdated";
45 pub fn identifier(&self) -> &'static str {
46 Self::IDENTIFIER
47 }
48}
49group_enum ! (CastEvents { SinksUpdated (SinksUpdated) , IssueUpdated (IssueUpdated) } + identifiable);