Line | Count | Source (jump to first uncovered line) |
1 | | //! Requests related to scenes. |
2 | | |
3 | | use serde::Serialize; |
4 | | use serde_with::skip_serializing_none; |
5 | | use time::Duration; |
6 | | |
7 | 96 | #[derive(S69 erializ27 e)] <<obws::requests::scenes::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<&mut serde_json::ser::Serializer<&mut alloc::vec::Vec<u8>>> Line | Count | Source | 7 | 2 | #[derive(Serialize)] |
<<obws::requests::scenes::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<&mut serde_json::ser::Serializer<&mut alloc::vec::Vec<u8>>> Line | Count | Source | 7 | 1 | #[derive(Serialize)] |
<<obws::requests::scenes::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<&mut serde_json::ser::Serializer<&mut alloc::vec::Vec<u8>>> Line | Count | Source | 7 | 1 | #[derive(Serialize)] |
<obws::requests::scenes::Request as serde::ser::Serialize>::serialize::<serde::__private::ser::FlatMapSerializer<serde_json::ser::Compound<&mut alloc::vec::Vec<u8>, serde_json::ser::CompactFormatter>>> Line | Count | Source | 7 | 69 | #[derive(Serialize)] |
Unexecuted instantiation: <obws::requests::scenes::Request as serde::ser::Serialize>::serialize::<&mut serde_json::ser::Serializer<&mut alloc::vec::Vec<u8>>> <<obws::requests::scenes::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<&mut serde_json::ser::Serializer<&mut alloc::vec::Vec<u8>>> Line | Count | Source | 7 | 1 | #[derive(Serialize)] |
<<obws::requests::scenes::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<&mut serde_json::ser::Serializer<&mut alloc::vec::Vec<u8>>> Line | Count | Source | 7 | 2 | #[derive(Serialize)] |
<<obws::requests::scenes::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<&mut serde_json::ser::Serializer<&mut alloc::vec::Vec<u8>>> Line | Count | Source | 7 | 20 | #[derive(Serialize)] |
Unexecuted instantiation: <<obws::requests::scenes::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_> Unexecuted instantiation: <<obws::requests::scenes::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_> Unexecuted instantiation: <<obws::requests::scenes::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_> Unexecuted instantiation: <obws::requests::scenes::Request as serde::ser::Serialize>::serialize::<_> Unexecuted instantiation: <<obws::requests::scenes::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_> Unexecuted instantiation: <<obws::requests::scenes::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_> Unexecuted instantiation: <<obws::requests::scenes::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_> Unexecuted instantiation: <<obws::requests::scenes::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_> Unexecuted instantiation: <<obws::requests::scenes::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_> Unexecuted instantiation: <<obws::requests::scenes::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_> Unexecuted instantiation: <<obws::requests::scenes::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_> Unexecuted instantiation: <<obws::requests::scenes::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_> Unexecuted instantiation: <<obws::requests::scenes::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_> Unexecuted instantiation: <obws::requests::scenes::Request as serde::ser::Serialize>::serialize::<_> |
8 | | #[serde(tag = "requestType", content = "requestData")] |
9 | | pub(crate) enum Request<'a> { |
10 | | #[serde(rename = "GetSceneList")] |
11 | | List, |
12 | | #[serde(rename = "GetGroupList")] |
13 | | ListGroups, |
14 | | #[serde(rename = "GetCurrentProgramScene")] |
15 | | CurrentProgramScene, |
16 | | #[serde(rename = "SetCurrentProgramScene")] |
17 | | SetCurrentProgramScene { |
18 | | /// Scene to set as the current program scene. |
19 | | #[serde(rename = "sceneName")] |
20 | | scene: &'a str, |
21 | | }, |
22 | | #[serde(rename = "GetCurrentPreviewScene")] |
23 | | CurrentPreviewScene, |
24 | | #[serde(rename = "SetCurrentPreviewScene")] |
25 | | SetCurrentPreviewScene { |
26 | | /// Scene to set as the current preview scene. |
27 | | #[serde(rename = "sceneName")] |
28 | | scene: &'a str, |
29 | | }, |
30 | | #[serde(rename = "SetSceneName")] |
31 | | SetName { |
32 | | /// Name of the scene to be renamed. |
33 | | #[serde(rename = "sceneName")] |
34 | | scene: &'a str, |
35 | | /// New name for the scene. |
36 | | #[serde(rename = "newSceneName")] |
37 | | new_name: &'a str, |
38 | | }, |
39 | | #[serde(rename = "CreateScene")] |
40 | | Create { |
41 | | /// Name for the new scene. |
42 | | #[serde(rename = "sceneName")] |
43 | | name: &'a str, |
44 | | }, |
45 | | #[serde(rename = "RemoveScene")] |
46 | | Remove { |
47 | | /// Name of the scene to remove. |
48 | | #[serde(rename = "sceneName")] |
49 | | scene: &'a str, |
50 | | }, |
51 | | #[serde(rename = "GetSceneSceneTransitionOverride")] |
52 | | TransitionOverride { |
53 | | /// Name of the scene. |
54 | | #[serde(rename = "sceneName")] |
55 | | scene: &'a str, |
56 | | }, |
57 | | #[serde(rename = "SetSceneSceneTransitionOverride")] |
58 | | SetTransitionOverride(SetTransitionOverride<'a>), |
59 | | } |
60 | | |
61 | | impl<'a> From<Request<'a>> for super::RequestType<'a> { |
62 | 69 | fn from(value: Request<'a>) -> Self { |
63 | 69 | super::RequestType::Scenes(value) |
64 | 69 | } <obws::requests::RequestType as core::convert::From<obws::requests::scenes::Request>>::from Line | Count | Source | 62 | 69 | fn from(value: Request<'a>) -> Self { | 63 | 69 | super::RequestType::Scenes(value) | 64 | 69 | } |
Unexecuted instantiation: <obws::requests::RequestType as core::convert::From<obws::requests::scenes::Request>>::from |
65 | | } |
66 | | |
67 | | /// Request information for [`crate::client::Scenes::set_transition_override`]. |
68 | | #[skip_serializing_none] |
69 | 2 | #[derive(Default0 , Serialize)] Unexecuted instantiation: <obws::requests::scenes::SetTransitionOverride as core::default::Default>::default Unexecuted instantiation: <obws::requests::scenes::SetTransitionOverride as core::default::Default>::default <obws::requests::scenes::SetTransitionOverride as serde::ser::Serialize>::serialize::<&mut serde_json::ser::Serializer<&mut alloc::vec::Vec<u8>>> Line | Count | Source | 69 | 2 | #[derive(Default, Serialize)] |
<<obws::requests::scenes::SetTransitionOverride as serde::ser::Serialize>::serialize::__SerializeWith as serde::ser::Serialize>::serialize::<&mut serde_json::ser::Serializer<&mut alloc::vec::Vec<u8>>> Line | Count | Source | 69 | 2 | #[derive(Default, Serialize)] |
Unexecuted instantiation: <<obws::requests::scenes::SetTransitionOverride as serde::ser::Serialize>::serialize::__SerializeWith as serde::ser::Serialize>::serialize::<_> Unexecuted instantiation: <obws::requests::scenes::SetTransitionOverride as serde::ser::Serialize>::serialize::<_> Unexecuted instantiation: <obws::requests::scenes::SetTransitionOverride as serde::ser::Serialize>::serialize::<_> Unexecuted instantiation: <<obws::requests::scenes::SetTransitionOverride as serde::ser::Serialize>::serialize::__SerializeWith as serde::ser::Serialize>::serialize::<_> |
70 | | pub struct SetTransitionOverride<'a> { |
71 | | /// Name of the scene. |
72 | | #[serde(rename = "sceneName")] |
73 | | pub scene: &'a str, |
74 | | /// Name of the scene transition to use as override. |
75 | | #[serde(rename = "transitionName")] |
76 | | pub transition: Option<&'a str>, |
77 | | /// Duration to use for any overridden transition. |
78 | | #[serde( |
79 | | rename = "transitionDuration", |
80 | | with = "crate::serde::duration_millis::option" |
81 | | )] |
82 | | pub duration: Option<Duration>, |
83 | | } |