Line | Count | Source (jump to first uncovered line) |
1 | | //! Requests related to profiles. |
2 | | |
3 | | use serde::Serialize; |
4 | | use serde_with::skip_serializing_none; |
5 | | |
6 | 32 | #[derive(S27 erializ5 e)] <<obws::requests::profiles::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::profiles::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::profiles::Request as serde::ser::Serialize>::serialize::<&mut serde_json::ser::Serializer<&mut alloc::vec::Vec<u8>>> <<obws::requests::profiles::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 | 2 | #[derive(Serialize)] |
<<obws::requests::profiles::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::profiles::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 | 27 | #[derive(Serialize)] |
Unexecuted instantiation: <<obws::requests::profiles::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_> Unexecuted instantiation: <obws::requests::profiles::Request as serde::ser::Serialize>::serialize::<_> Unexecuted instantiation: <<obws::requests::profiles::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_> Unexecuted instantiation: <<obws::requests::profiles::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_> Unexecuted instantiation: <<obws::requests::profiles::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_> Unexecuted instantiation: <obws::requests::profiles::Request as serde::ser::Serialize>::serialize::<_> Unexecuted instantiation: <<obws::requests::profiles::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_> Unexecuted instantiation: <<obws::requests::profiles::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_> Unexecuted instantiation: <<obws::requests::profiles::Request as serde::ser::Serialize>::serialize::__AdjacentlyTagged as serde::ser::Serialize>::serialize::<_> Unexecuted instantiation: <<obws::requests::profiles::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 = "GetProfileList")] |
10 | | List, |
11 | | #[serde(rename = "SetCurrentProfile")] |
12 | | SetCurrent { |
13 | | /// Name of the profile to switch to. |
14 | | #[serde(rename = "profileName")] |
15 | | name: &'a str, |
16 | | }, |
17 | | #[serde(rename = "CreateProfile")] |
18 | | Create { |
19 | | /// Name for the new profile. |
20 | | #[serde(rename = "profileName")] |
21 | | name: &'a str, |
22 | | }, |
23 | | #[serde(rename = "RemoveProfile")] |
24 | | Remove { |
25 | | /// Name of the profile to remove. |
26 | | #[serde(rename = "profileName")] |
27 | | name: &'a str, |
28 | | }, |
29 | | #[serde(rename = "GetProfileParameter")] |
30 | | Parameter { |
31 | | /// Category of the parameter to get. |
32 | | #[serde(rename = "parameterCategory")] |
33 | | category: &'a str, |
34 | | /// Name of the parameter to get. |
35 | | #[serde(rename = "parameterName")] |
36 | | name: &'a str, |
37 | | }, |
38 | | #[serde(rename = "SetProfileParameter")] |
39 | | SetParameter(SetParameter<'a>), |
40 | | } |
41 | | |
42 | | impl<'a> From<Request<'a>> for super::RequestType<'a> { |
43 | 27 | fn from(value: Request<'a>) -> Self { |
44 | 27 | super::RequestType::Profiles(value) |
45 | 27 | } <obws::requests::RequestType as core::convert::From<obws::requests::profiles::Request>>::from Line | Count | Source | 43 | 27 | fn from(value: Request<'a>) -> Self { | 44 | 27 | super::RequestType::Profiles(value) | 45 | 27 | } |
Unexecuted instantiation: <obws::requests::RequestType as core::convert::From<obws::requests::profiles::Request>>::from |
46 | | } |
47 | | |
48 | | /// Request information for [`crate::client::Profiles::set_parameter`]. |
49 | | #[skip_serializing_none] |
50 | 2 | #[derive(Default0 , Serialize)] Unexecuted instantiation: <obws::requests::profiles::SetParameter as core::default::Default>::default Unexecuted instantiation: <obws::requests::profiles::SetParameter as core::default::Default>::default <obws::requests::profiles::SetParameter as serde::ser::Serialize>::serialize::<&mut serde_json::ser::Serializer<&mut alloc::vec::Vec<u8>>> Line | Count | Source | 50 | 2 | #[derive(Default, Serialize)] |
Unexecuted instantiation: <obws::requests::profiles::SetParameter as serde::ser::Serialize>::serialize::<_> Unexecuted instantiation: <obws::requests::profiles::SetParameter as serde::ser::Serialize>::serialize::<_> |
51 | | pub struct SetParameter<'a> { |
52 | | /// Category of the parameter to set. |
53 | | #[serde(rename = "parameterCategory")] |
54 | | pub category: &'a str, |
55 | | /// Name of the parameter to set. |
56 | | #[serde(rename = "parameterName")] |
57 | | pub name: &'a str, |
58 | | /// Value of the parameter to set. Use [`None`] to delete. |
59 | | #[serde(rename = "parameterValue")] |
60 | | pub value: Option<&'a str>, |
61 | | } |