Coverage Report

Created: 2025-02-16 11:37

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/home/runner/work/obws/obws/src/requests/scene_collections.rs
Line
Count
Source
1
//! Requests related to scene collections.
2
3
use serde::Serialize;
4
5
#[derive(Serialize)]
6
#[serde(tag = "requestType", content = "requestData")]
7
pub(crate) enum Request<'a> {
8
    #[serde(rename = "GetSceneCollectionList")]
9
    List,
10
    #[serde(rename = "SetCurrentSceneCollection")]
11
    SetCurrent {
12
        /// Name of the scene collection to switch to.
13
        #[serde(rename = "sceneCollectionName")]
14
        name: &'a str,
15
    },
16
    #[serde(rename = "CreateSceneCollection")]
17
    Create {
18
        /// Name for the new scene collection.
19
        #[serde(rename = "sceneCollectionName")]
20
        name: &'a str,
21
    },
22
}
23
24
impl<'a> From<Request<'a>> for super::RequestType<'a> {
25
4
    fn from(value: Request<'a>) -> Self {
26
4
        super::RequestType::SceneCollections(value)
27
4
    }
28
}