@@ -182,12 +182,43 @@ pub(crate) struct JSONEngineRecord {
182
182
pub variants : Vec < JSONEngineVariant > ,
183
183
}
184
184
185
+ #[ derive( Debug , Deserialize , Clone ) ]
186
+ #[ serde( rename_all = "camelCase" ) ]
187
+ pub ( crate ) struct JSONSpecificDefaultRecord {
188
+ /// The identifier of the engine that will be used as the application default
189
+ /// for the associated environment. If the entry is suffixed with a star,
190
+ /// matching is applied on a "starts with" basis.
191
+ #[ serde( default ) ]
192
+ pub default : String ,
193
+
194
+ /// The identifier of the engine that will be used as the application default
195
+ /// in private mode for the associated environment. If the entry is suffixed
196
+ /// with a star, matching is applied on a "starts with" basis.
197
+ #[ serde( default ) ]
198
+ pub default_private : String ,
199
+
200
+ /// The specific environment to match for this record.
201
+ pub environment : JSONVariantEnvironment ,
202
+ }
203
+
185
204
/// Represents the default engines record.
186
205
#[ derive( Debug , Deserialize , Clone ) ]
187
206
#[ serde( rename_all = "camelCase" ) ]
188
207
pub ( crate ) struct JSONDefaultEnginesRecord {
208
+ /// The identifier of the engine that will be used as the application default
209
+ /// if no other engines are specified as default.
189
210
pub global_default : String ,
190
- pub global_default_private : Option < String > ,
211
+
212
+ /// The identifier of the engine that will be used as the application default
213
+ /// in private mode if no other engines are specified as default.
214
+ #[ serde( default ) ]
215
+ pub global_default_private : String ,
216
+
217
+ /// The specific environment filters to set a different default engine. The
218
+ /// array is ordered, when multiple entries match on environments, the later
219
+ /// entry will override earlier entries.
220
+ #[ serde( default ) ]
221
+ pub specific_defaults : Vec < JSONSpecificDefaultRecord > ,
191
222
}
192
223
193
224
/// Represents the engine orders record.
0 commit comments