@@ -2,14 +2,13 @@ use ockam_core::compat::string::String;
2
2
use ockam_core:: compat:: sync:: Arc ;
3
3
use ockam_core:: flow_control:: FlowControls ;
4
4
use ockam_core:: {
5
- Address , IncomingAccessControl , Message , OutgoingAccessControl , Processor , Result , Route ,
6
- Routed , TryClone , Worker ,
5
+ Address , IncomingAccessControl , Message , OutgoingAccessControl , Result , Route , Routed , TryClone ,
7
6
} ;
8
7
use ockam_identity:: {
9
8
CredentialRepository , IdentitiesAttributes , IdentitiesVerification ,
10
9
IdentityAttributesRepository , PurposeKeys , Vault ,
11
10
} ;
12
- use ockam_node:: { Context , HasContext , MessageReceiveOptions , MessageSendReceiveOptions } ;
11
+ use ockam_node:: { Context , HasContext , MessageReceiveOptions , MessageSendReceiveOptions , Worker } ;
13
12
use ockam_vault:: storage:: SecretsRepository ;
14
13
use ockam_vault:: SigningSecretKeyHandle ;
15
14
@@ -161,51 +160,22 @@ impl Node {
161
160
}
162
161
163
162
/// Start a new worker instance at the given address. Default Access Control is AllowAll
164
- pub fn start_worker < W > ( & self , address : impl Into < Address > , worker : W ) -> Result < ( ) >
165
- where
166
- W : Worker < Context = Context > ,
167
- {
163
+ pub fn start_worker < W : Worker > ( & self , address : impl Into < Address > , worker : W ) -> Result < ( ) > {
168
164
self . context . start_worker ( address, worker)
169
165
}
170
166
171
167
/// Start a new worker instance at the given address with given Access Controls
172
- pub fn start_worker_with_access_control < W > (
168
+ pub fn start_worker_with_access_control < W : Worker > (
173
169
& self ,
174
170
address : impl Into < Address > ,
175
171
worker : W ,
176
172
incoming : impl IncomingAccessControl ,
177
173
outgoing : impl OutgoingAccessControl ,
178
- ) -> Result < ( ) >
179
- where
180
- W : Worker < Context = Context > ,
181
- {
174
+ ) -> Result < ( ) > {
182
175
self . context
183
176
. start_worker_with_access_control ( address, worker, incoming, outgoing)
184
177
}
185
178
186
- /// Start a new processor instance at the given address. Default Access Control is DenyAll
187
- pub fn start_processor < P > ( & self , address : impl Into < Address > , processor : P ) -> Result < ( ) >
188
- where
189
- P : Processor < Context = Context > ,
190
- {
191
- self . context . start_processor ( address, processor)
192
- }
193
-
194
- /// Start a new processor instance at the given address with given Access Controls
195
- pub fn start_processor_with_access_control < P > (
196
- & self ,
197
- address : impl Into < Address > ,
198
- processor : P ,
199
- incoming : impl IncomingAccessControl ,
200
- outgoing : impl OutgoingAccessControl ,
201
- ) -> Result < ( ) >
202
- where
203
- P : Processor < Context = Context > ,
204
- {
205
- self . context
206
- . start_processor_with_access_control ( address, processor, incoming, outgoing)
207
- }
208
-
209
179
/// Signal to the local runtime to shut down
210
180
pub async fn shutdown ( & mut self ) -> Result < ( ) > {
211
181
self . context . shutdown_node ( ) . await
0 commit comments