Coverage Report

Created: 2022-07-04 16:17

src/responses/general.rs
Line
Count
Source (jump to first uncovered line)
1
//! General responses, not fitting into any category.
2
3
use serde::Deserialize;
4
5
/// Response value for [`crate::client::General::version`].
6
285
#[derive(
Debug0
,
D133
ese
rializ19
e)]
Unexecuted instantiation: <obws::responses::general::Version as core::fmt::Debug>::fmt
Unexecuted instantiation: <obws::responses::general::Version as core::fmt::Debug>::fmt
<<obws::responses::general::Version as serde::de::Deserialize>::deserialize::__Field as serde::de::Deserialize>::deserialize::<serde_json::value::de::MapKeyDeserializer>
Line
Count
Source
6
133
#[derive(Debug, Deserialize)]
<obws::responses::general::Version as serde::de::Deserialize>::deserialize::<serde_json::value::Value>
Line
Count
Source
6
19
#[derive(Debug, Deserialize)]
Unexecuted instantiation: <<obws::responses::general::Version as serde::de::Deserialize>::deserialize::__Visitor as serde::de::Visitor>::visit_seq::<&mut serde_json::value::de::SeqDeserializer>
<<obws::responses::general::Version as serde::de::Deserialize>::deserialize::__FieldVisitor as serde::de::Visitor>::visit_str::<serde_json::error::Error>
Line
Count
Source
6
133
#[derive(Debug, Deserialize)]
<<obws::responses::general::Version as serde::de::Deserialize>::deserialize::__Visitor as serde::de::Visitor>::visit_map::<&mut serde_json::value::de::MapDeserializer>
Line
Count
Source
6
152
#[derive(Debug, 
Dese19
rializ19
e)]
Unexecuted instantiation: <<obws::responses::general::Version as serde::de::Deserialize>::deserialize::__Visitor as serde::de::Visitor>::visit_map::<_>
Unexecuted instantiation: <<obws::responses::general::Version as serde::de::Deserialize>::deserialize::__Visitor as serde::de::Visitor>::visit_seq::<_>
Unexecuted instantiation: <<obws::responses::general::Version as serde::de::Deserialize>::deserialize::__FieldVisitor as serde::de::Visitor>::visit_str::<_>
Unexecuted instantiation: <<obws::responses::general::Version as serde::de::Deserialize>::deserialize::__FieldVisitor as serde::de::Visitor>::visit_u64::<_>
Unexecuted instantiation: <<obws::responses::general::Version as serde::de::Deserialize>::deserialize::__FieldVisitor as serde::de::Visitor>::visit_bytes::<_>
Unexecuted instantiation: <obws::responses::general::Version as serde::de::Deserialize>::deserialize::<_>
Unexecuted instantiation: <<obws::responses::general::Version as serde::de::Deserialize>::deserialize::__Field as serde::de::Deserialize>::deserialize::<_>
Unexecuted instantiation: <<obws::responses::general::Version as serde::de::Deserialize>::deserialize::__FieldVisitor as serde::de::Visitor>::expecting
Unexecuted instantiation: <<obws::responses::general::Version as serde::de::Deserialize>::deserialize::__Visitor as serde::de::Visitor>::expecting
Unexecuted instantiation: <<obws::responses::general::Version as serde::de::Deserialize>::deserialize::__FieldVisitor as serde::de::Visitor>::expecting
Unexecuted instantiation: <obws::responses::general::Version as serde::de::Deserialize>::deserialize::<_>
Unexecuted instantiation: <<obws::responses::general::Version as serde::de::Deserialize>::deserialize::__Field as serde::de::Deserialize>::deserialize::<_>
Unexecuted instantiation: <<obws::responses::general::Version as serde::de::Deserialize>::deserialize::__Visitor as serde::de::Visitor>::expecting
Unexecuted instantiation: <<obws::responses::general::Version as serde::de::Deserialize>::deserialize::__FieldVisitor as serde::de::Visitor>::visit_u64::<_>
Unexecuted instantiation: <<obws::responses::general::Version as serde::de::Deserialize>::deserialize::__Visitor as serde::de::Visitor>::visit_map::<_>
Unexecuted instantiation: <<obws::responses::general::Version as serde::de::Deserialize>::deserialize::__FieldVisitor as serde::de::Visitor>::visit_str::<_>
Unexecuted instantiation: <<obws::responses::general::Version as serde::de::Deserialize>::deserialize::__FieldVisitor as serde::de::Visitor>::visit_bytes::<_>
Unexecuted instantiation: <<obws::responses::general::Version as serde::de::Deserialize>::deserialize::__Visitor as serde::de::Visitor>::visit_seq::<_>
7
pub struct Version {
8
    /// Current OBS Studio version.
9
    #[serde(rename = "obsVersion")]
10
    pub obs_version: semver::Version,
11
    /// Current obs-websocket version.
12
    #[serde(rename = "obsWebSocketVersion")]
13
    pub obs_web_socket_version: semver::Version,
14
    /// Current latest obs-websocket RPC version.
15
    #[serde(rename = "rpcVersion")]
16
    pub rpc_version: u32,
17
    /// Array of available RPC requests for the currently negotiated RPC version.
18
    #[serde(rename = "availableRequests")]
19
    pub available_requests: Vec<String>,
20
    /// Image formats available in `GetSourceScreenshot` and `SaveSourceScreenshot` requests.
21
    #[serde(rename = "supportedImageFormats")]
22
    pub supported_image_formats: Vec<String>,
23
    /// Name of the platform. Usually `windows`, `macos`, or `ubuntu` (Linux flavor). Not guaranteed
24
    /// to be any of those.
25
    #[serde(rename = "platform")]
26
    pub platform: String,
27
    /// Description of the platform, like `Windows 10 (10.0)`.
28
    #[serde(rename = "platformDescription")]
29
    pub platform_description: String,
30
}
31
32
/// Response value for [`crate::client::General::stats`].
33
23
#[derive(
Debug0
,
D11
ese
rializ0
e)]
Unexecuted instantiation: <obws::responses::general::Stats as core::fmt::Debug>::fmt
Unexecuted instantiation: <obws::responses::general::Stats as core::fmt::Debug>::fmt
<obws::responses::general::Stats as serde::de::Deserialize>::deserialize::<serde_json::value::Value>
Line
Count
Source
33
1
#[derive(Debug, Deserialize)]
Unexecuted instantiation: <<obws::responses::general::Stats as serde::de::Deserialize>::deserialize::__Visitor as serde::de::Visitor>::visit_map::<&mut serde_json::value::de::MapDeserializer>
<<obws::responses::general::Stats as serde::de::Deserialize>::deserialize::__Field as serde::de::Deserialize>::deserialize::<serde_json::value::de::MapKeyDeserializer>
Line
Count
Source
33
11
#[derive(Debug, Deserialize)]
Unexecuted instantiation: <<obws::responses::general::Stats as serde::de::Deserialize>::deserialize::__Visitor as serde::de::Visitor>::visit_seq::<&mut serde_json::value::de::SeqDeserializer>
<<obws::responses::general::Stats as serde::de::Deserialize>::deserialize::__FieldVisitor as serde::de::Visitor>::visit_str::<serde_json::error::Error>
Line
Count
Source
33
11
#[derive(Debug, Deserialize)]
Unexecuted instantiation: <<obws::responses::general::Stats as serde::de::Deserialize>::deserialize::__Visitor as serde::de::Visitor>::visit_seq::<_>
Unexecuted instantiation: <<obws::responses::general::Stats as serde::de::Deserialize>::deserialize::__FieldVisitor as serde::de::Visitor>::visit_bytes::<_>
Unexecuted instantiation: <<obws::responses::general::Stats as serde::de::Deserialize>::deserialize::__Field as serde::de::Deserialize>::deserialize::<_>
Unexecuted instantiation: <<obws::responses::general::Stats as serde::de::Deserialize>::deserialize::__Visitor as serde::de::Visitor>::visit_map::<_>
Unexecuted instantiation: <obws::responses::general::Stats as serde::de::Deserialize>::deserialize::<_>
Unexecuted instantiation: <<obws::responses::general::Stats as serde::de::Deserialize>::deserialize::__FieldVisitor as serde::de::Visitor>::visit_str::<_>
Unexecuted instantiation: <<obws::responses::general::Stats as serde::de::Deserialize>::deserialize::__FieldVisitor as serde::de::Visitor>::visit_u64::<_>
Unexecuted instantiation: <<obws::responses::general::Stats as serde::de::Deserialize>::deserialize::__Visitor as serde::de::Visitor>::expecting
Unexecuted instantiation: <<obws::responses::general::Stats as serde::de::Deserialize>::deserialize::__FieldVisitor as serde::de::Visitor>::expecting
Unexecuted instantiation: <<obws::responses::general::Stats as serde::de::Deserialize>::deserialize::__FieldVisitor as serde::de::Visitor>::visit_bytes::<_>
Unexecuted instantiation: <<obws::responses::general::Stats as serde::de::Deserialize>::deserialize::__Visitor as serde::de::Visitor>::visit_map::<_>
Unexecuted instantiation: <<obws::responses::general::Stats as serde::de::Deserialize>::deserialize::__Field as serde::de::Deserialize>::deserialize::<_>
Unexecuted instantiation: <<obws::responses::general::Stats as serde::de::Deserialize>::deserialize::__Visitor as serde::de::Visitor>::visit_seq::<_>
Unexecuted instantiation: <<obws::responses::general::Stats as serde::de::Deserialize>::deserialize::__Visitor as serde::de::Visitor>::expecting
Unexecuted instantiation: <obws::responses::general::Stats as serde::de::Deserialize>::deserialize::<_>
Unexecuted instantiation: <<obws::responses::general::Stats as serde::de::Deserialize>::deserialize::__FieldVisitor as serde::de::Visitor>::visit_str::<_>
Unexecuted instantiation: <<obws::responses::general::Stats as serde::de::Deserialize>::deserialize::__FieldVisitor as serde::de::Visitor>::visit_u64::<_>
Unexecuted instantiation: <<obws::responses::general::Stats as serde::de::Deserialize>::deserialize::__FieldVisitor as serde::de::Visitor>::expecting
34
pub struct Stats {
35
    /// Current CPU usage in percent.
36
    #[serde(rename = "cpuUsage")]
37
    pub cpu_usage: f64,
38
    /// Amount of memory in MB currently being used by OBS.
39
    #[serde(rename = "memoryUsage")]
40
    pub memory_usage: f64,
41
    /// Available disk space on the device being used for recording storage.
42
    #[serde(rename = "availableDiskSpace")]
43
    pub available_disk_space: f64,
44
    /// Current FPS being rendered.
45
    #[serde(rename = "activeFps")]
46
    pub active_fps: f64,
47
    /// Average time in milliseconds that OBS is taking to render a frame.
48
    #[serde(rename = "averageFrameRenderTime")]
49
    pub average_frame_render_time: f64,
50
    /// Number of frames skipped by OBS in the render thread.
51
    #[serde(rename = "renderSkippedFrames")]
52
    pub render_skipped_frames: u32,
53
    /// Total number of frames outputted by the render thread.
54
    #[serde(rename = "renderTotalFrames")]
55
    pub render_total_frames: u32,
56
    /// Number of frames skipped by OBS in the output thread.
57
    #[serde(rename = "outputSkippedFrames")]
58
    pub output_skipped_frames: u32,
59
    /// Total number of frames outputted by the output thread.
60
    #[serde(rename = "outputTotalFrames")]
61
    pub output_total_frames: u32,
62
    /// Total number of messages received by obs-websocket from the client.
63
    #[serde(rename = "webSocketSessionIncomingMessages")]
64
    pub web_socket_session_incoming_messages: u64,
65
    /// Total number of messages sent by obs-websocket to the client.
66
    #[serde(rename = "webSocketSessionOutgoingMessages")]
67
    pub web_socket_session_outgoing_messages: u64,
68
}
69
70
/// Response value for [`crate::client::General::call_vendor_request`].
71
0
#[derive(Debug, Deserialize)]
Unexecuted instantiation: <obws::responses::general::VendorResponse<_> as core::fmt::Debug>::fmt
Unexecuted instantiation: <obws::responses::general::VendorResponse<_> as core::fmt::Debug>::fmt
Unexecuted instantiation: <<obws::responses::general::VendorResponse<_> as serde::de::Deserialize>::deserialize::__FieldVisitor as serde::de::Visitor>::visit_bytes::<_>
Unexecuted instantiation: <<obws::responses::general::VendorResponse<_> as serde::de::Deserialize>::deserialize::__Field as serde::de::Deserialize>::deserialize::<_>
Unexecuted instantiation: <obws::responses::general::VendorResponse<_> as serde::de::Deserialize>::deserialize::<_>
Unexecuted instantiation: <<obws::responses::general::VendorResponse<_> as serde::de::Deserialize>::deserialize::__Visitor<_> as serde::de::Visitor>::visit_seq::<_>
Unexecuted instantiation: <<obws::responses::general::VendorResponse<_> as serde::de::Deserialize>::deserialize::__FieldVisitor as serde::de::Visitor>::visit_str::<_>
Unexecuted instantiation: <<obws::responses::general::VendorResponse<_> as serde::de::Deserialize>::deserialize::__FieldVisitor as serde::de::Visitor>::visit_u64::<_>
Unexecuted instantiation: <<obws::responses::general::VendorResponse<_> as serde::de::Deserialize>::deserialize::__Visitor<_> as serde::de::Visitor>::visit_map::<_>
Unexecuted instantiation: <<obws::responses::general::VendorResponse<_> as serde::de::Deserialize>::deserialize::__Visitor<_> as serde::de::Visitor>::expecting
Unexecuted instantiation: <<obws::responses::general::VendorResponse<_> as serde::de::Deserialize>::deserialize::__FieldVisitor as serde::de::Visitor>::expecting
Unexecuted instantiation: <<obws::responses::general::VendorResponse<_> as serde::de::Deserialize>::deserialize::__FieldVisitor as serde::de::Visitor>::expecting
Unexecuted instantiation: <<obws::responses::general::VendorResponse<_> as serde::de::Deserialize>::deserialize::__Visitor<_> as serde::de::Visitor>::visit_seq::<_>
Unexecuted instantiation: <<obws::responses::general::VendorResponse<_> as serde::de::Deserialize>::deserialize::__Field as serde::de::Deserialize>::deserialize::<_>
Unexecuted instantiation: <<obws::responses::general::VendorResponse<_> as serde::de::Deserialize>::deserialize::__FieldVisitor as serde::de::Visitor>::visit_u64::<_>
Unexecuted instantiation: <<obws::responses::general::VendorResponse<_> as serde::de::Deserialize>::deserialize::__Visitor<_> as serde::de::Visitor>::expecting
Unexecuted instantiation: <<obws::responses::general::VendorResponse<_> as serde::de::Deserialize>::deserialize::__FieldVisitor as serde::de::Visitor>::visit_bytes::<_>
Unexecuted instantiation: <<obws::responses::general::VendorResponse<_> as serde::de::Deserialize>::deserialize::__FieldVisitor as serde::de::Visitor>::visit_str::<_>
Unexecuted instantiation: <<obws::responses::general::VendorResponse<_> as serde::de::Deserialize>::deserialize::__Visitor<_> as serde::de::Visitor>::visit_map::<_>
Unexecuted instantiation: <obws::responses::general::VendorResponse<_> as serde::de::Deserialize>::deserialize::<_>
72
pub struct VendorResponse<T> {
73
    /// Name of the vendor.
74
    #[serde(rename = "vendorName")]
75
    pub vendor_name: String,
76
    /// Type of request.
77
    #[serde(rename = "requestType")]
78
    pub request_type: String,
79
    /// Object containing appropriate response data.
80
    #[serde(rename = "responseData")]
81
    pub response_data: T,
82
}