Coverage Report

Created: 2022-07-04 16:17

src/requests/transitions.rs
Line
Count
Source
1
//! Requests related to transitions.
2
3
use serde::Serialize;
4
use time::Duration;
5
6
13
#[derive(
S11
eri
aliz2
e)]
<<obws::requests::transitions::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
6
1
#[derive(Serialize)]
<<<obws::requests::transitions::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::__SerializeWith as serde::ser::Serialize>::serialize::<&mut serde_json::ser::Serializer<&mut alloc::vec::Vec<u8>>>
Line
Count
Source
6
1
#[derive(Serialize)]
<<obws::requests::transitions::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
6
1
#[derive(Serialize)]
<<obws::requests::transitions::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
6
1
#[derive(Serialize)]
<<obws::requests::transitions::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
6
1
#[derive(Serialize)]
Unexecuted instantiation: <obws::requests::transitions::Request as serde::ser::Serialize>::serialize::<&mut serde_json::ser::Serializer<&mut alloc::vec::Vec<u8>>>
<obws::requests::transitions::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
6
9
#[derive(Serialize)]
Unexecuted instantiation: <<<obws::requests::transitions::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::__SerializeWith as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::transitions::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <obws::requests::transitions::Request as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::transitions::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::transitions::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::transitions::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::transitions::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::transitions::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<<obws::requests::transitions::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::__SerializeWith as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <obws::requests::transitions::Request as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::transitions::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::transitions::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
7
#[serde(tag = "requestType", content = "requestData")]
8
pub(crate) enum Request<'a> {
9
    #[serde(rename = "GetTransitionKindList")]
10
    GetTransitionKindList,
11
    #[serde(rename = "GetSceneTransitionList")]
12
    GetSceneTransitionList,
13
    #[serde(rename = "GetCurrentSceneTransition")]
14
    GetCurrentSceneTransition,
15
    #[serde(rename = "SetCurrentSceneTransition")]
16
    SetCurrentSceneTransition {
17
        /// Name of the transition to make active.
18
        #[serde(rename = "transitionName")]
19
        name: &'a str,
20
    },
21
    #[serde(rename = "SetCurrentSceneTransitionDuration")]
22
    SetCurrentSceneTransitionDuration {
23
        /// Duration in milliseconds.
24
        #[serde(rename = "transitionDuration", with = "crate::serde::duration_millis")]
25
        duration: Duration,
26
    },
27
    #[serde(rename = "SetCurrentSceneTransitionSettings")]
28
    SetCurrentSceneTransitionSettings {
29
        /// Settings object to apply to the transition.
30
        #[serde(rename = "transitionSettings")]
31
        settings: serde_json::Value,
32
        /// Whether to overlay over the current settings or replace them.
33
        #[serde(rename = "overlay", skip_serializing_if = "Option::is_none")]
34
        overlay: Option<bool>,
35
    },
36
    #[serde(rename = "GetCurrentSceneTransitionCursor")]
37
    GetCurrentSceneTransitionCursor,
38
    #[serde(rename = "TriggerStudioModeTransition")]
39
    TriggerStudioModeTransition,
40
    #[serde(rename = "SetTBarPosition")]
41
    SetTbarPosition {
42
        /// New position.
43
        #[serde(rename = "position")]
44
        position: f32,
45
        /// Whether to release the T-Bar. Only set `false` if you know that you will be sending
46
        /// another position update.
47
        #[serde(rename = "release", skip_serializing_if = "Option::is_none")]
48
        release: Option<bool>,
49
    },
50
}
51
52
impl<'a> From<Request<'a>> for super::RequestType<'a> {
53
9
    fn from(value: Request<'a>) -> Self {
54
9
        super::RequestType::Transitions(value)
55
9
    }
<obws::requests::RequestType as core::convert::From<obws::requests::transitions::Request>>::from
Line
Count
Source
53
9
    fn from(value: Request<'a>) -> Self {
54
9
        super::RequestType::Transitions(value)
55
9
    }
Unexecuted instantiation: <obws::requests::RequestType as core::convert::From<obws::requests::transitions::Request>>::from
56
}