File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -27,12 +27,27 @@ use crate::MithrilResult;
27
27
pub struct ClientOptions {
28
28
/// HTTP headers to include in the client requests.
29
29
pub http_headers : Option < HashMap < String , String > > ,
30
+
31
+ /// Whether to enable unstable features in the WASM client.
32
+ #[ cfg( target_family = "wasm" ) ]
33
+ #[ cfg_attr( target_family = "wasm" , serde( default ) ) ]
34
+ pub unstable : bool ,
30
35
}
31
36
32
37
impl ClientOptions {
33
38
/// Instantiate a new [ClientOptions].
34
39
pub fn new ( http_headers : Option < HashMap < String , String > > ) -> Self {
35
- Self { http_headers }
40
+ Self {
41
+ http_headers,
42
+ #[ cfg( target_family = "wasm" ) ]
43
+ unstable : false ,
44
+ }
45
+ }
46
+
47
+ /// Enable unstable features in the WASM client.
48
+ #[ cfg( target_family = "wasm" ) ]
49
+ pub fn with_unstable_features ( self , unstable : bool ) -> Self {
50
+ Self { unstable, ..self }
36
51
}
37
52
}
38
53
You can’t perform that action at this time.
0 commit comments