File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -17,14 +17,15 @@ impl Features {
17
17
pub fn new ( ) -> Self {
18
18
Self :: default ( )
19
19
}
20
+
20
21
/// Enable the built-in HTTP server capability provider
21
- pub fn with_builtin_http ( mut self ) -> Self {
22
+ pub fn enable_builtin_http ( mut self ) -> Self {
22
23
self . builtin_http = true ;
23
24
self
24
25
}
25
26
26
27
/// Enable the built-in NATS messaging capability provider
27
- pub fn with_builtin_messaging ( mut self ) -> Self {
28
+ pub fn enable_builtin_messaging ( mut self ) -> Self {
28
29
self . builtin_messaging = true ;
29
30
self
30
31
}
@@ -55,8 +56,8 @@ impl std::iter::Sum for Features {
55
56
impl From < & str > for Features {
56
57
fn from ( s : & str ) -> Self {
57
58
match & * s. to_ascii_lowercase ( ) {
58
- "builtin-http" | "builtin_http" => Self :: new ( ) . with_builtin_http ( ) ,
59
- "builtin-messaging" | "builtin_messaging" => Self :: new ( ) . with_builtin_messaging ( ) ,
59
+ "builtin-http" | "builtin_http" => Self :: new ( ) . enable_builtin_http ( ) ,
60
+ "builtin-messaging" | "builtin_messaging" => Self :: new ( ) . enable_builtin_messaging ( ) ,
60
61
_ => {
61
62
warn ! ( %s, "unknown feature flag" ) ;
62
63
Self :: new ( )
Original file line number Diff line number Diff line change @@ -71,10 +71,10 @@ pub mod config;
71
71
/// wasmCloud host configuration
72
72
pub mod host_config;
73
73
74
+ pub use self :: experimental:: Features ;
74
75
pub use self :: host_config:: Host as HostConfig ;
75
76
76
77
use self :: config:: { BundleGenerator , ConfigBundle } ;
77
- pub use self :: experimental:: Features ;
78
78
use self :: handler:: Handler ;
79
79
80
80
const MAX_INVOCATION_CHANNEL_SIZE : usize = 5000 ;
Original file line number Diff line number Diff line change @@ -101,7 +101,9 @@ impl WasmCloudTestHost {
101
101
provider_shutdown_delay : Some ( Duration :: from_millis ( 300 ) ) ,
102
102
allow_file_load : true ,
103
103
secrets_topic_prefix,
104
- experimental_features : Features :: new ( ) . with_builtin_http ( ) . with_builtin_messaging ( ) ,
104
+ experimental_features : Features :: new ( )
105
+ . enable_builtin_http ( )
106
+ . enable_builtin_messaging ( ) ,
105
107
..Default :: default ( )
106
108
} ;
107
109
if let Some ( psc) = policy_service_config {
You can’t perform that action at this time.
0 commit comments