Coverage Report

Created: 2022-07-04 16:17

src/requests/media_inputs.rs
Line
Count
Source
1
//! Requests related to media inputs.
2
3
use serde::Serialize;
4
use time::Duration;
5
6
use crate::common::MediaAction;
7
8
8
#[derive(
S4
eri
aliz4
e)]
<<obws::requests::media_inputs::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::media_inputs::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::media_inputs::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
4
#[derive(Serialize)]
<<<obws::requests::media_inputs::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
8
1
#[derive(Serialize)]
<<obws::requests::media_inputs::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::media_inputs::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::media_inputs::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
8
1
#[derive(Serialize)]
Unexecuted instantiation: <obws::requests::media_inputs::Request as serde::ser::Serialize>::serialize::<&mut serde_json::ser::Serializer<&mut alloc::vec::Vec<u8>>>
Unexecuted instantiation: <<obws::requests::media_inputs::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::media_inputs::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<<obws::requests::media_inputs::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::__SerializeWith as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <obws::requests::media_inputs::Request as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<<obws::requests::media_inputs::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::__SerializeWith as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::media_inputs::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::media_inputs::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::media_inputs::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <obws::requests::media_inputs::Request as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<<obws::requests::media_inputs::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::__SerializeWith as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<<obws::requests::media_inputs::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::__SerializeWith as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::media_inputs::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::media_inputs::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::media_inputs::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
9
#[serde(tag = "requestType", content = "requestData")]
10
pub(crate) enum Request<'a> {
11
    #[serde(rename = "GetMediaInputStatus")]
12
    Status {
13
        /// Name of the media input.
14
        #[serde(rename = "inputName")]
15
        input: &'a str,
16
    },
17
    #[serde(rename = "SetMediaInputCursor")]
18
    SetCursor {
19
        /// Name of the media input.
20
        #[serde(rename = "inputName")]
21
        input: &'a str,
22
        /// New cursor position to set.
23
        #[serde(rename = "mediaCursor", with = "crate::serde::duration_millis")]
24
        cursor: Duration,
25
    },
26
    #[serde(rename = "OffsetMediaInputCursor")]
27
    OffsetCursor {
28
        /// Name of the media input.
29
        #[serde(rename = "inputName")]
30
        input: &'a str,
31
        /// Value to offset the current cursor position by.
32
        #[serde(rename = "mediaCursorOffset", with = "crate::serde::duration_millis")]
33
        offset: Duration,
34
    },
35
    #[serde(rename = "TriggerMediaInputAction")]
36
    TriggerAction {
37
        /// Name of the media input.
38
        #[serde(rename = "inputName")]
39
        input: &'a str,
40
        /// Identifier of the media action.
41
        #[serde(rename = "mediaAction")]
42
        action: MediaAction,
43
    },
44
}
45
46
impl<'a> From<Request<'a>> for super::RequestType<'a> {
47
4
    fn from(value: Request<'a>) -> Self {
48
4
        super::RequestType::MediaInputs(value)
49
4
    }
<obws::requests::RequestType as core::convert::From<obws::requests::media_inputs::Request>>::from
Line
Count
Source
47
4
    fn from(value: Request<'a>) -> Self {
48
4
        super::RequestType::MediaInputs(value)
49
4
    }
Unexecuted instantiation: <obws::requests::RequestType as core::convert::From<obws::requests::media_inputs::Request>>::from
50
}