Coverage Report

Created: 2022-07-04 16:17

src/requests/scene_items.rs
Line
Count
Source (jump to first uncovered line)
1
//! Requests related to scene items.
2
3
use serde::Serialize;
4
use serde_with::skip_serializing_none;
5
6
use crate::common::{Alignment, BoundsType};
7
8
29
#[derive(
S20
eri
aliz9
e)]
<<obws::requests::scene_items::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
8
1
#[derive(Serialize)]
<<obws::requests::scene_items::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
8
1
#[derive(Serialize)]
<<obws::requests::scene_items::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
8
1
#[derive(Serialize)]
<<obws::requests::scene_items::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
8
1
#[derive(Serialize)]
<<obws::requests::scene_items::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
8
1
#[derive(Serialize)]
<obws::requests::scene_items::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
8
20
#[derive(Serialize)]
<<obws::requests::scene_items::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
8
1
#[derive(Serialize)]
<<obws::requests::scene_items::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
8
1
#[derive(Serialize)]
Unexecuted instantiation: <obws::requests::scene_items::Request as serde::ser::Serialize>::serialize::<&mut serde_json::ser::Serializer<&mut alloc::vec::Vec<u8>>>
<<obws::requests::scene_items::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
8
2
#[derive(Serialize)]
Unexecuted instantiation: <<obws::requests::scene_items::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <obws::requests::scene_items::Request as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::scene_items::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::scene_items::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::scene_items::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::scene_items::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::scene_items::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::scene_items::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::scene_items::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::scene_items::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::scene_items::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::scene_items::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::scene_items::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::scene_items::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::scene_items::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::scene_items::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::scene_items::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <obws::requests::scene_items::Request as serde::ser::Serialize>::serialize::<_>
9
#[serde(tag = "requestType", content = "requestData")]
10
pub(crate) enum Request<'a> {
11
    #[serde(rename = "GetSceneItemList")]
12
    List {
13
        /// Name of the scene to get the items of.
14
        #[serde(rename = "sceneName")]
15
        scene: &'a str,
16
    },
17
    #[serde(rename = "GetGroupSceneItemList")]
18
    ListGroup {
19
        /// Name of the group to get the items of.
20
        #[serde(rename = "sceneName")]
21
        scene: &'a str,
22
    },
23
    #[serde(rename = "GetSceneItemId")]
24
    Id(Id<'a>),
25
    #[serde(rename = "CreateSceneItem")]
26
    Create(CreateSceneItem<'a>),
27
    #[serde(rename = "RemoveSceneItem")]
28
    Remove {
29
        /// Name of the scene the item is in.
30
        #[serde(rename = "sceneName")]
31
        scene: &'a str,
32
        /// Numeric ID of the scene item.
33
        #[serde(rename = "sceneItemId")]
34
        item_id: i64,
35
    },
36
    #[serde(rename = "DuplicateSceneItem")]
37
    Duplicate(Duplicate<'a>),
38
    #[serde(rename = "GetSceneItemTransform")]
39
    Transform {
40
        /// Name of the scene the item is in.
41
        #[serde(rename = "sceneName")]
42
        scene: &'a str,
43
        /// Numeric ID of the scene item.
44
        #[serde(rename = "sceneItemId")]
45
        item_id: i64,
46
    },
47
    #[serde(rename = "SetSceneItemTransform")]
48
    SetTransform(SetTransform<'a>),
49
    #[serde(rename = "GetSceneItemEnabled")]
50
    Enabled {
51
        /// Name of the scene the item is in.
52
        #[serde(rename = "sceneName")]
53
        scene: &'a str,
54
        /// Numeric ID of the scene item.
55
        #[serde(rename = "sceneItemId")]
56
        item_id: i64,
57
    },
58
    #[serde(rename = "SetSceneItemEnabled")]
59
    SetEnabled(SetEnabled<'a>),
60
    #[serde(rename = "GetSceneItemLocked")]
61
    Locked {
62
        /// Name of the scene the item is in.
63
        #[serde(rename = "sceneName")]
64
        scene: &'a str,
65
        /// Numeric ID of the scene item.
66
        #[serde(rename = "sceneItemId")]
67
        item_id: i64,
68
    },
69
    #[serde(rename = "SetSceneItemLocked")]
70
    SetLocked(SetLocked<'a>),
71
    #[serde(rename = "GetSceneItemIndex")]
72
    Index {
73
        /// Name of the scene the item is in.
74
        #[serde(rename = "sceneName")]
75
        scene: &'a str,
76
        /// Numeric ID of the scene item.
77
        #[serde(rename = "sceneItemId")]
78
        item_id: i64,
79
    },
80
    #[serde(rename = "SetSceneItemIndex")]
81
    SetIndex(SetIndex<'a>),
82
    #[serde(rename = "GetSceneItemPrivateSettings")]
83
    PrivateSettings {
84
        /// Name of the scene the item is in.
85
        #[serde(rename = "sceneName")]
86
        scene: &'a str,
87
        /// Numeric ID of the scene item.
88
        #[serde(rename = "sceneItemId")]
89
        item_id: i64,
90
    },
91
    #[serde(rename = "SetSceneItemPrivateSettings")]
92
    SetPrivateSettings(SetPrivateSettingsInternal<'a>),
93
}
94
95
impl<'a> From<Request<'a>> for super::RequestType<'a> {
96
20
    fn from(value: Request<'a>) -> Self {
97
20
        super::RequestType::SceneItems(value)
98
20
    }
<obws::requests::RequestType as core::convert::From<obws::requests::scene_items::Request>>::from
Line
Count
Source
96
20
    fn from(value: Request<'a>) -> Self {
97
20
        super::RequestType::SceneItems(value)
98
20
    }
Unexecuted instantiation: <obws::requests::RequestType as core::convert::From<obws::requests::scene_items::Request>>::from
99
}
100
101
/// Request information for [`crate::client::SceneItems::id`].
102
#[skip_serializing_none]
103
1
#[derive(
Default0
, Serialize)]
Unexecuted instantiation: <obws::requests::scene_items::Id as core::default::Default>::default
Unexecuted instantiation: <obws::requests::scene_items::Id as core::default::Default>::default
<obws::requests::scene_items::Id as serde::ser::Serialize>::serialize::<&mut serde_json::ser::Serializer<&mut alloc::vec::Vec<u8>>>
Line
Count
Source
103
1
#[derive(Default, Serialize)]
Unexecuted instantiation: <obws::requests::scene_items::Id as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <obws::requests::scene_items::Id as serde::ser::Serialize>::serialize::<_>
104
pub struct Id<'a> {
105
    /// Name of the scene or group to search in.
106
    #[serde(rename = "sceneName")]
107
    pub scene: &'a str,
108
    /// Name of the source to find.
109
    #[serde(rename = "sourceName")]
110
    pub source: &'a str,
111
    /// Number of matches to skip during search.
112
    ///
113
    /// `>= 0` means first forward. `-1` means last (top) item.
114
    #[serde(rename = "searchOffset")]
115
    pub search_offset: Option<i32>,
116
}
117
118
/// Request information for [`crate::client::SceneItems::create`].
119
#[skip_serializing_none]
120
1
#[derive(
Default0
, Serialize)]
Unexecuted instantiation: <obws::requests::scene_items::CreateSceneItem as core::default::Default>::default
Unexecuted instantiation: <obws::requests::scene_items::CreateSceneItem as core::default::Default>::default
<obws::requests::scene_items::CreateSceneItem as serde::ser::Serialize>::serialize::<&mut serde_json::ser::Serializer<&mut alloc::vec::Vec<u8>>>
Line
Count
Source
120
1
#[derive(Default, Serialize)]
Unexecuted instantiation: <obws::requests::scene_items::CreateSceneItem as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <obws::requests::scene_items::CreateSceneItem as serde::ser::Serialize>::serialize::<_>
121
pub struct CreateSceneItem<'a> {
122
    /// Name of the scene to create the new item in.
123
    #[serde(rename = "sceneName")]
124
    pub scene: &'a str,
125
    /// Name of the source to add to the scene.
126
    #[serde(rename = "sourceName")]
127
    pub source: &'a str,
128
    /// Enable state to apply to the scene item on creation.
129
    #[serde(rename = "sceneItemEnabled")]
130
    pub enabled: Option<bool>,
131
}
132
133
/// Request information for [`crate::client::SceneItems::duplicate`].
134
#[skip_serializing_none]
135
1
#[derive(
Default0
, Serialize)]
Unexecuted instantiation: <obws::requests::scene_items::Duplicate as core::default::Default>::default
Unexecuted instantiation: <obws::requests::scene_items::Duplicate as core::default::Default>::default
<obws::requests::scene_items::Duplicate as serde::ser::Serialize>::serialize::<&mut serde_json::ser::Serializer<&mut alloc::vec::Vec<u8>>>
Line
Count
Source
135
1
#[derive(Default, Serialize)]
Unexecuted instantiation: <obws::requests::scene_items::Duplicate as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <obws::requests::scene_items::Duplicate as serde::ser::Serialize>::serialize::<_>
136
pub struct Duplicate<'a> {
137
    /// Name of the scene the item is in.
138
    #[serde(rename = "sceneName")]
139
    pub scene: &'a str,
140
    /// Numeric ID of the scene item.
141
    #[serde(rename = "sceneItemId")]
142
    pub item_id: i64,
143
    /// Name of the scene to create the duplicated item in.
144
    #[serde(rename = "destinationSceneName")]
145
    pub destination: Option<&'a str>,
146
}
147
148
/// Request information for [`crate::client::SceneItems::set_transform`].
149
2
#[derive(
Default0
, Serialize)]
Unexecuted instantiation: <obws::requests::scene_items::SetTransform as core::default::Default>::default
Unexecuted instantiation: <obws::requests::scene_items::SetTransform as core::default::Default>::default
<obws::requests::scene_items::SetTransform as serde::ser::Serialize>::serialize::<&mut serde_json::ser::Serializer<&mut alloc::vec::Vec<u8>>>
Line
Count
Source
149
2
#[derive(Default, Serialize)]
Unexecuted instantiation: <obws::requests::scene_items::SetTransform as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <obws::requests::scene_items::SetTransform as serde::ser::Serialize>::serialize::<_>
150
pub struct SetTransform<'a> {
151
    /// Name of the scene the item is in.
152
    #[serde(rename = "sceneName")]
153
    pub scene: &'a str,
154
    /// Numeric ID of the scene item.
155
    #[serde(rename = "sceneItemId")]
156
    pub item_id: i64,
157
    /// Object containing scene item transform info to update.
158
    #[serde(rename = "sceneItemTransform")]
159
    pub transform: SceneItemTransform,
160
}
161
162
/// Request information for [`crate::client::SceneItems::set_transform`] as part of
163
/// [`SetTransform`].
164
#[skip_serializing_none]
165
12
#[derive(
Default2
,
S2
erialize)]
<obws::requests::scene_items::SceneItemTransform as core::default::Default>::default
Line
Count
Source
165
2
#[derive(Default, Serialize)]
Unexecuted instantiation: <obws::requests::scene_items::SceneItemTransform as core::default::Default>::default
Unexecuted instantiation: <obws::requests::scene_items::SceneItemTransform as core::default::Default>::default
<obws::requests::scene_items::SceneItemTransform as serde::ser::Serialize>::serialize::<&mut serde_json::ser::Serializer<&mut alloc::vec::Vec<u8>>>
Line
Count
Source
165
12
#[derive(Default, 
S2
erialize)]
Unexecuted instantiation: <obws::requests::scene_items::SceneItemTransform as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <obws::requests::scene_items::SceneItemTransform as serde::ser::Serialize>::serialize::<_>
166
pub struct SceneItemTransform {
167
    /// Position (or offset) on the screen.
168
    #[serde(rename = "position", flatten)]
169
    pub position: Option<Position>,
170
    /// The clockwise rotation of the scene item in degrees around the point of alignment.
171
    #[serde(rename = "rotation")]
172
    pub rotation: Option<f32>,
173
    /// Scaling of the item.
174
    #[serde(rename = "scale", flatten)]
175
    pub scale: Option<Scale>,
176
    /// The point on the source that the item is manipulated from.
177
    #[serde(rename = "alignment")]
178
    pub alignment: Option<Alignment>,
179
    /// Bound restrictions on the item.
180
    #[serde(rename = "bounds", flatten)]
181
    pub bounds: Option<Bounds>,
182
    /// Cropping values on up to 4 sides.
183
    #[serde(rename = "crop", flatten)]
184
    pub crop: Option<Crop>,
185
}
186
187
impl From<crate::responses::scene_items::SceneItemTransform> for SceneItemTransform {
188
0
    fn from(t: crate::responses::scene_items::SceneItemTransform) -> Self {
189
0
        Self {
190
0
            position: Some(Position {
191
0
                x: Some(t.position_x),
192
0
                y: Some(t.position_y),
193
0
            }),
194
0
            rotation: Some(t.rotation),
195
0
            scale: Some(Scale {
196
0
                x: Some(t.scale_x),
197
0
                y: Some(t.scale_y),
198
0
            }),
199
0
            alignment: Some(t.alignment),
200
0
            bounds: Some(Bounds {
201
0
                r#type: Some(t.bounds_type),
202
0
                alignment: Some(t.bounds_alignment),
203
0
                width: Some(t.bounds_width),
204
0
                height: Some(t.bounds_height),
205
0
            }),
206
0
            crop: Some(Crop {
207
0
                left: Some(t.crop_left),
208
0
                right: Some(t.crop_right),
209
0
                top: Some(t.crop_top),
210
0
                bottom: Some(t.crop_bottom),
211
0
            }),
212
0
        }
213
0
    }
Unexecuted instantiation: <obws::requests::scene_items::SceneItemTransform as core::convert::From<obws::responses::scene_items::SceneItemTransform>>::from
Unexecuted instantiation: <obws::requests::scene_items::SceneItemTransform as core::convert::From<obws::responses::scene_items::SceneItemTransform>>::from
214
}
215
216
/// Request information for [`crate::client::SceneItems::set_transform`] as part of
217
/// [`SceneItemTransform`].
218
#[skip_serializing_none]
219
0
#[derive(Default, Serialize)]
Unexecuted instantiation: <obws::requests::scene_items::Position as core::default::Default>::default
Unexecuted instantiation: <obws::requests::scene_items::Position as core::default::Default>::default
Unexecuted instantiation: <obws::requests::scene_items::Position as serde::ser::Serialize>::serialize::<serde::__private::ser::FlatMapSerializer<serde_json::ser::Compound<&mut alloc::vec::Vec<u8>, serde_json::ser::CompactFormatter>>>
Unexecuted instantiation: <obws::requests::scene_items::Position as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <obws::requests::scene_items::Position as serde::ser::Serialize>::serialize::<_>
220
pub struct Position {
221
    /// The x position of the source from the left.
222
    #[serde(rename = "positionX")]
223
    pub x: Option<f32>,
224
    /// The y position of the source from the top.
225
    #[serde(rename = "positionY")]
226
    pub y: Option<f32>,
227
}
228
229
/// Request information for [`crate::client::SceneItems::set_transform`] as part of
230
/// [`SceneItemTransform`].
231
#[skip_serializing_none]
232
0
#[derive(Default, Serialize)]
Unexecuted instantiation: <obws::requests::scene_items::Scale as core::default::Default>::default
Unexecuted instantiation: <obws::requests::scene_items::Scale as core::default::Default>::default
Unexecuted instantiation: <obws::requests::scene_items::Scale as serde::ser::Serialize>::serialize::<serde::__private::ser::FlatMapSerializer<serde_json::ser::Compound<&mut alloc::vec::Vec<u8>, serde_json::ser::CompactFormatter>>>
Unexecuted instantiation: <obws::requests::scene_items::Scale as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <obws::requests::scene_items::Scale as serde::ser::Serialize>::serialize::<_>
233
pub struct Scale {
234
    /// The x-scale factor of the source.
235
    #[serde(rename = "scaleX")]
236
    pub x: Option<f32>,
237
    /// The y-scale factor of the source.
238
    #[serde(rename = "scaleY")]
239
    pub y: Option<f32>,
240
}
241
242
/// Request information for [`crate::client::SceneItems::set_transform`] as part of
243
/// [`SceneItemTransform`].
244
#[skip_serializing_none]
245
2
#[derive(Default, Serialize)]
<obws::requests::scene_items::Bounds as core::default::Default>::default
Line
Count
Source
245
2
#[derive(Default, Serialize)]
Unexecuted instantiation: <obws::requests::scene_items::Bounds as core::default::Default>::default
Unexecuted instantiation: <obws::requests::scene_items::Bounds as core::default::Default>::default
<obws::requests::scene_items::Bounds 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
245
2
#[derive(Default, Serialize)]
Unexecuted instantiation: <obws::requests::scene_items::Bounds as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <obws::requests::scene_items::Bounds as serde::ser::Serialize>::serialize::<_>
246
pub struct Bounds {
247
    /// Type of bounding box.
248
    #[serde(rename = "boundsType")]
249
    pub r#type: Option<BoundsType>,
250
    /// Alignment of the bounding box.
251
    #[serde(rename = "boundsAlignment")]
252
    pub alignment: Option<Alignment>,
253
    /// Width of the bounding box.
254
    #[serde(rename = "boundsWidth")]
255
    pub width: Option<f32>,
256
    /// Height of the bounding box.
257
    #[serde(rename = "boundsHeight")]
258
    pub height: Option<f32>,
259
}
260
261
/// Request information for [`crate::client::SceneItems::set_transform`] as part of
262
/// [`SceneItemTransform`].
263
#[skip_serializing_none]
264
0
#[derive(Default, Serialize)]
Unexecuted instantiation: <obws::requests::scene_items::Crop as core::default::Default>::default
Unexecuted instantiation: <obws::requests::scene_items::Crop as core::default::Default>::default
Unexecuted instantiation: <obws::requests::scene_items::Crop as serde::ser::Serialize>::serialize::<serde::__private::ser::FlatMapSerializer<serde_json::ser::Compound<&mut alloc::vec::Vec<u8>, serde_json::ser::CompactFormatter>>>
Unexecuted instantiation: <obws::requests::scene_items::Crop as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <obws::requests::scene_items::Crop as serde::ser::Serialize>::serialize::<_>
265
pub struct Crop {
266
    /// The number of pixels cropped off the left of the source before scaling.
267
    #[serde(rename = "cropLeft")]
268
    pub left: Option<u32>,
269
    /// The number of pixels cropped off the right of the source before scaling.
270
    #[serde(rename = "cropRight")]
271
    pub right: Option<u32>,
272
    /// The number of pixels cropped off the top of the source before scaling.
273
    #[serde(rename = "cropTop")]
274
    pub top: Option<u32>,
275
    /// The number of pixels cropped off the bottom of the source before scaling.
276
    #[serde(rename = "cropBottom")]
277
    pub bottom: Option<u32>,
278
}
279
280
/// Request information for [`crate::client::SceneItems::set_enabled`].
281
2
#[derive(
Default0
, Serialize)]
Unexecuted instantiation: <obws::requests::scene_items::SetEnabled as core::default::Default>::default
Unexecuted instantiation: <obws::requests::scene_items::SetEnabled as core::default::Default>::default
<obws::requests::scene_items::SetEnabled as serde::ser::Serialize>::serialize::<&mut serde_json::ser::Serializer<&mut alloc::vec::Vec<u8>>>
Line
Count
Source
281
2
#[derive(Default, Serialize)]
Unexecuted instantiation: <obws::requests::scene_items::SetEnabled as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <obws::requests::scene_items::SetEnabled as serde::ser::Serialize>::serialize::<_>
282
pub struct SetEnabled<'a> {
283
    /// Name of the scene the item is in.
284
    #[serde(rename = "sceneName")]
285
    pub scene: &'a str,
286
    /// Numeric ID of the scene item.
287
    #[serde(rename = "sceneItemId")]
288
    pub item_id: i64,
289
    /// New enable state of the scene item.
290
    #[serde(rename = "sceneItemEnabled")]
291
    pub enabled: bool,
292
}
293
294
/// Request information for [`crate::client::SceneItems::set_locked`].
295
2
#[derive(
Default0
, Serialize)]
Unexecuted instantiation: <obws::requests::scene_items::SetLocked as core::default::Default>::default
Unexecuted instantiation: <obws::requests::scene_items::SetLocked as core::default::Default>::default
<obws::requests::scene_items::SetLocked as serde::ser::Serialize>::serialize::<&mut serde_json::ser::Serializer<&mut alloc::vec::Vec<u8>>>
Line
Count
Source
295
2
#[derive(Default, Serialize)]
Unexecuted instantiation: <obws::requests::scene_items::SetLocked as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <obws::requests::scene_items::SetLocked as serde::ser::Serialize>::serialize::<_>
296
pub struct SetLocked<'a> {
297
    /// Name of the scene the item is in.
298
    #[serde(rename = "sceneName")]
299
    pub scene: &'a str,
300
    /// Numeric ID of the scene item.
301
    #[serde(rename = "sceneItemId")]
302
    pub item_id: i64,
303
    /// New lock state of the scene item.
304
    #[serde(rename = "sceneItemLocked")]
305
    pub locked: bool,
306
}
307
308
/// Request information for [`crate::client::SceneItems::set_index`].
309
2
#[derive(
Default0
, Serialize)]
Unexecuted instantiation: <obws::requests::scene_items::SetIndex as core::default::Default>::default
Unexecuted instantiation: <obws::requests::scene_items::SetIndex as core::default::Default>::default
<obws::requests::scene_items::SetIndex as serde::ser::Serialize>::serialize::<&mut serde_json::ser::Serializer<&mut alloc::vec::Vec<u8>>>
Line
Count
Source
309
2
#[derive(Default, Serialize)]
Unexecuted instantiation: <obws::requests::scene_items::SetIndex as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <obws::requests::scene_items::SetIndex as serde::ser::Serialize>::serialize::<_>
310
pub struct SetIndex<'a> {
311
    /// Name of the scene the item is in.
312
    #[serde(rename = "sceneName")]
313
    pub scene: &'a str,
314
    /// Numeric ID of the scene item.
315
    #[serde(rename = "sceneItemId")]
316
    pub item_id: i64,
317
    /// New index position of the scene item.
318
    #[serde(rename = "sceneItemIndex")]
319
    pub index: u32,
320
}
321
322
/// Request information for [`crate::client::SceneItems::set_private_settings`].
323
pub struct SetPrivateSettings<'a, T> {
324
    /// Name of the scene the item is in.
325
    pub scene: &'a str,
326
    /// Numeric ID of the scene item.
327
    pub item_id: i64,
328
    /// Object of settings to apply.
329
    pub settings: &'a T,
330
}
331
332
/// Request information for
333
/// [`crate::client::SceneItems::set_scene_item_private_settings`].
334
#[skip_serializing_none]
335
0
#[derive(Default, Serialize)]
Unexecuted instantiation: <obws::requests::scene_items::SetPrivateSettingsInternal as core::default::Default>::default
Unexecuted instantiation: <obws::requests::scene_items::SetPrivateSettingsInternal as core::default::Default>::default
Unexecuted instantiation: <obws::requests::scene_items::SetPrivateSettingsInternal as serde::ser::Serialize>::serialize::<&mut serde_json::ser::Serializer<&mut alloc::vec::Vec<u8>>>
Unexecuted instantiation: <obws::requests::scene_items::SetPrivateSettingsInternal as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <obws::requests::scene_items::SetPrivateSettingsInternal as serde::ser::Serialize>::serialize::<_>
336
pub(crate) struct SetPrivateSettingsInternal<'a> {
337
    /// Name of the scene the item is in.
338
    #[serde(rename = "sceneName")]
339
    pub scene: &'a str,
340
    /// Numeric ID of the scene item.
341
    #[serde(rename = "sceneItemId")]
342
    pub item_id: i64,
343
    /// Object of settings to apply.
344
    #[serde(rename = "sceneItemSettings")]
345
    pub settings: serde_json::Value,
346
}