Coverage Report

Created: 2022-07-04 16:17

src/requests/streaming.rs
Line
Count
Source (jump to first uncovered line)
1
//! Requests related to streaming.
2
3
use serde::Serialize;
4
5
1
#[derive(Seri
aliz0
e)]
Unexecuted instantiation: <<obws::requests::streaming::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<&mut serde_json::ser::Serializer<&mut alloc::vec::Vec<u8>>>
Unexecuted instantiation: <obws::requests::streaming::Request as serde::ser::Serialize>::serialize::<&mut serde_json::ser::Serializer<&mut alloc::vec::Vec<u8>>>
<obws::requests::streaming::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
1
#[derive(Serialize)]
Unexecuted instantiation: <<obws::requests::streaming::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <obws::requests::streaming::Request as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <obws::requests::streaming::Request as serde::ser::Serialize>::serialize::<_>
Unexecuted instantiation: <<obws::requests::streaming::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 = "GetStreamStatus")]
9
    GetStreamStatus,
10
    #[serde(rename = "ToggleStream")]
11
    ToggleStream,
12
    #[serde(rename = "StartStream")]
13
    StartStream,
14
    #[serde(rename = "StopStream")]
15
    StopStream,
16
    #[serde(rename = "SendStreamCaption")]
17
    SendStreamCaption {
18
        /// Caption text.
19
        #[serde(rename = "captionText")]
20
        caption_text: &'a str,
21
    },
22
}
23
24
impl<'a> From<Request<'a>> for super::RequestType<'a> {
25
1
    fn from(value: Request<'a>) -> Self {
26
1
        super::RequestType::Streaming(value)
27
1
    }
<obws::requests::RequestType as core::convert::From<obws::requests::streaming::Request>>::from
Line
Count
Source
25
1
    fn from(value: Request<'a>) -> Self {
26
1
        super::RequestType::Streaming(value)
27
1
    }
Unexecuted instantiation: <obws::requests::RequestType as core::convert::From<obws::requests::streaming::Request>>::from
28
}