Coverage Report

Created: 2022-07-04 16:17

src/requests/outputs.rs
Line
Count
Source
1
//! Requests related to outputs.
2
3
use serde::Serialize;
4
5
15
#[derive(
S8
eri
aliz7
e)]
<<obws::requests::outputs::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
5
1
#[derive(Serialize)]
<<obws::requests::outputs::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
5
2
#[derive(Serialize)]
<<obws::requests::outputs::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
5
1
#[derive(Serialize)]
<<obws::requests::outputs::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
5
1
#[derive(Serialize)]
<<obws::requests::outputs::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
5
1
#[derive(Serialize)]
Unexecuted instantiation: <obws::requests::outputs::Request as serde::ser::Serialize>::serialize::<&mut serde_json::ser::Serializer<&mut alloc::vec::Vec<u8>>>
<obws::requests::outputs::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
5
8
#[derive(Serialize)]
<<obws::requests::outputs::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
5
1
#[derive(Serialize)]
Unexecuted instantiation: <<obws::requests::outputs::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::outputs::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::outputs::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::outputs::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::outputs::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <obws::requests::outputs::Request as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::outputs::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::outputs::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <obws::requests::outputs::Request as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::outputs::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::outputs::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::outputs::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::outputs::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::outputs::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
6
#[serde(tag = "requestType", content = "requestData")]
7
pub(crate) enum Request<'a> {
8
    #[serde(rename = "GetOutputList")]
9
    List,
10
    #[serde(rename = "GetOutputStatus")]
11
    Status {
12
        /// Output name.
13
        #[serde(rename = "outputName")]
14
        name: &'a str,
15
    },
16
    #[serde(rename = "ToggleOutput")]
17
    Toggle {
18
        /// Output name.
19
        #[serde(rename = "outputName")]
20
        name: &'a str,
21
    },
22
    #[serde(rename = "StartOutput")]
23
    Start {
24
        /// Output name.
25
        #[serde(rename = "outputName")]
26
        name: &'a str,
27
    },
28
    #[serde(rename = "StopOutput")]
29
    Stop {
30
        /// Output name.
31
        #[serde(rename = "outputName")]
32
        name: &'a str,
33
    },
34
    #[serde(rename = "GetOutputSettings")]
35
    Settings {
36
        /// Output name.
37
        #[serde(rename = "outputName")]
38
        name: &'a str,
39
    },
40
    #[serde(rename = "SetOutputSettings")]
41
    SetSettings {
42
        /// Output name.
43
        #[serde(rename = "outputName")]
44
        name: &'a str,
45
        /// Output settings.
46
        #[serde(rename = "outputSettings")]
47
        settings: serde_json::Value,
48
    },
49
}
50
51
impl<'a> From<Request<'a>> for super::RequestType<'a> {
52
8
    fn from(value: Request<'a>) -> Self {
53
8
        super::RequestType::Outputs(value)
54
8
    }
<obws::requests::RequestType as core::convert::From<obws::requests::outputs::Request>>::from
Line
Count
Source
52
8
    fn from(value: Request<'a>) -> Self {
53
8
        super::RequestType::Outputs(value)
54
8
    }
Unexecuted instantiation: <obws::requests::RequestType as core::convert::From<obws::requests::outputs::Request>>::from
55
}