rustenium_cdp_definitions/browser_protocol/animation/
events.rs1use serde::{Deserialize, Serialize};
2#[doc = "Event for when an animation has been cancelled.\n[animationCanceled](https://chromedevtools.github.io/devtools-protocol/tot/Animation/#event-animationCanceled)"]
3#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4pub struct AnimationCanceledParams {
5 #[doc = "Id of the animation that was cancelled."]
6 #[serde(rename = "id")]
7 pub id: String,
8}
9#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10pub enum AnimationCanceledMethod {
11 #[serde(rename = "Animation.animationCanceled")]
12 AnimationCanceled,
13}
14#[doc = "Event for when an animation has been cancelled.\n[animationCanceled](https://chromedevtools.github.io/devtools-protocol/tot/Animation/#event-animationCanceled)"]
15#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
16pub struct AnimationCanceled {
17 pub method: AnimationCanceledMethod,
18 pub params: AnimationCanceledParams,
19}
20impl AnimationCanceled {
21 pub const IDENTIFIER: &'static str = "Animation.animationCanceled";
22 pub fn identifier(&self) -> &'static str {
23 Self::IDENTIFIER
24 }
25}
26#[doc = "Event for each animation that has been created.\n[animationCreated](https://chromedevtools.github.io/devtools-protocol/tot/Animation/#event-animationCreated)"]
27#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
28pub struct AnimationCreatedParams {
29 #[doc = "Id of the animation that was created."]
30 #[serde(rename = "id")]
31 pub id: String,
32}
33#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
34pub enum AnimationCreatedMethod {
35 #[serde(rename = "Animation.animationCreated")]
36 AnimationCreated,
37}
38#[doc = "Event for each animation that has been created.\n[animationCreated](https://chromedevtools.github.io/devtools-protocol/tot/Animation/#event-animationCreated)"]
39#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
40pub struct AnimationCreated {
41 pub method: AnimationCreatedMethod,
42 pub params: AnimationCreatedParams,
43}
44impl AnimationCreated {
45 pub const IDENTIFIER: &'static str = "Animation.animationCreated";
46 pub fn identifier(&self) -> &'static str {
47 Self::IDENTIFIER
48 }
49}
50#[doc = "Event for animation that has been started.\n[animationStarted](https://chromedevtools.github.io/devtools-protocol/tot/Animation/#event-animationStarted)"]
51#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
52pub struct AnimationStartedParams {
53 #[doc = "Animation that was started."]
54 #[serde(rename = "animation")]
55 pub animation: super::types::Animation,
56}
57#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
58pub enum AnimationStartedMethod {
59 #[serde(rename = "Animation.animationStarted")]
60 AnimationStarted,
61}
62#[doc = "Event for animation that has been started.\n[animationStarted](https://chromedevtools.github.io/devtools-protocol/tot/Animation/#event-animationStarted)"]
63#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
64pub struct AnimationStarted {
65 pub method: AnimationStartedMethod,
66 pub params: AnimationStartedParams,
67}
68impl AnimationStarted {
69 pub const IDENTIFIER: &'static str = "Animation.animationStarted";
70 pub fn identifier(&self) -> &'static str {
71 Self::IDENTIFIER
72 }
73}
74#[doc = "Event for animation that has been updated.\n[animationUpdated](https://chromedevtools.github.io/devtools-protocol/tot/Animation/#event-animationUpdated)"]
75#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
76pub struct AnimationUpdatedParams {
77 #[doc = "Animation that was updated."]
78 #[serde(rename = "animation")]
79 pub animation: super::types::Animation,
80}
81#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
82pub enum AnimationUpdatedMethod {
83 #[serde(rename = "Animation.animationUpdated")]
84 AnimationUpdated,
85}
86#[doc = "Event for animation that has been updated.\n[animationUpdated](https://chromedevtools.github.io/devtools-protocol/tot/Animation/#event-animationUpdated)"]
87#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
88pub struct AnimationUpdated {
89 pub method: AnimationUpdatedMethod,
90 pub params: AnimationUpdatedParams,
91}
92impl AnimationUpdated {
93 pub const IDENTIFIER: &'static str = "Animation.animationUpdated";
94 pub fn identifier(&self) -> &'static str {
95 Self::IDENTIFIER
96 }
97}
98group_enum ! (AnimationEvents { AnimationCanceled (AnimationCanceled) , AnimationCreated (AnimationCreated) , AnimationStarted (AnimationStarted) , AnimationUpdated (AnimationUpdated) } + identifiable);