@@ -45,7 +45,7 @@ macro_rules! deserialize_unit_struct {
45
45
impl <' de> Deserialize <' de> for $msg {
46
46
fn deserialize<D >( deserializer: D ) -> Result <Self , D :: Error >
47
47
where
48
- D : serde :: de :: Deserializer <' de>,
48
+ D : Deserializer <' de>,
49
49
{
50
50
struct Visitor ;
51
51
@@ -77,7 +77,7 @@ const fn default_as_true() -> bool {
77
77
true
78
78
}
79
79
80
- /// Supports "double option" pattern for update requests.
80
+ /// Supports the "double option" pattern for update requests.
81
81
///
82
82
/// - Parses missing field as `None`.
83
83
/// - Parses field with value `None` as `Some(None)`.
@@ -147,22 +147,20 @@ pub struct SetConfig(pub Config);
147
147
///
148
148
/// # Parameters
149
149
///
150
- /// None .
150
+ /// See [fields](#fields) .
151
151
///
152
152
/// # Returns
153
153
///
154
154
/// [`ConnectorResponse::RuntimeInstalled`] - No data.
155
155
///
156
- #[ cfg ( platform_linux ) ]
157
- # [ derive ( Deserialize , Debug , Eq , PartialEq , Clone ) ]
158
- pub struct InstallRuntime {
159
- /// Experimental: Use a linked runtime instead of downloading from Mozilla.
156
+ #[ derive ( Deserialize , Debug , Eq , PartialEq , Clone , Default ) ]
157
+ pub struct InstallRuntimeOptions {
158
+ /// Whether to use a linked runtime instead of downloading from Mozilla (experimental, default: `false`).
159
+ # [ serde ( default ) ]
160
160
pub link : bool ,
161
161
}
162
162
163
- #[ cfg( not( platform_linux) ) ]
164
- #[ derive( Debug , Eq , PartialEq , Clone ) ]
165
- pub struct InstallRuntime ;
163
+ pub type InstallRuntime = Option < InstallRuntimeOptions > ;
166
164
167
165
/// Uninstalls the Firefox runtime.
168
166
///
@@ -174,8 +172,10 @@ pub struct InstallRuntime;
174
172
///
175
173
/// [`ConnectorResponse::RuntimeUninstalled`] - No Data
176
174
///
177
- #[ derive( Debug , Eq , PartialEq , Clone ) ]
178
- pub struct UninstallRuntime ;
175
+ #[ derive( Deserialize , Debug , Eq , PartialEq , Clone , Default ) ]
176
+ pub struct UninstallRuntimeOptions { }
177
+
178
+ pub type UninstallRuntime = Option < UninstallRuntimeOptions > ;
179
179
180
180
/// Gets all installed web apps.
181
181
///
@@ -376,11 +376,11 @@ pub struct UpdateSite {
376
376
/// If empty, no handlers are registered to the operating system.
377
377
pub enabled_protocol_handlers : Option < Vec < String > > ,
378
378
379
- /// Whether the web app should be launched on the system login.
379
+ /// Whether the web app should be launched on the system login (default: `false`) .
380
380
#[ serde( default ) ]
381
381
pub launch_on_login : Option < bool > ,
382
382
383
- /// Whether the web app should be launched on the browser launch.
383
+ /// Whether the web app should be launched on the browser launch (default: `false`) .
384
384
#[ serde( default ) ]
385
385
pub launch_on_browser : Option < bool > ,
386
386
@@ -401,7 +401,7 @@ pub struct UpdateSite {
401
401
///
402
402
/// # Parameters
403
403
///
404
- /// None .
404
+ /// See [fields](#fields) .
405
405
///
406
406
/// # Returns
407
407
///
@@ -514,7 +514,7 @@ pub struct UpdateProfile {
514
514
///
515
515
/// # Parameters
516
516
///
517
- /// None .
517
+ /// See [fields](#fields) .
518
518
///
519
519
/// # Returns
520
520
///
@@ -611,9 +611,6 @@ impl Into<crate::console::app::HTTPClientConfig> for HTTPClientConfig {
611
611
612
612
deserialize_unit_struct ! ( GetSystemVersions ) ;
613
613
deserialize_unit_struct ! ( GetConfig ) ;
614
- #[ cfg( not( platform_linux) ) ]
615
- deserialize_unit_struct ! ( InstallRuntime ) ;
616
- deserialize_unit_struct ! ( UninstallRuntime ) ;
617
614
deserialize_unit_struct ! ( GetSiteList ) ;
618
615
deserialize_unit_struct ! ( GetProfileList ) ;
619
616
0 commit comments