pub trait CapabilityProvider:
CloneProvider
+ Send
+ Sync {
// Required methods
fn configure_dispatch(
&self,
dispatcher: Box<dyn Dispatcher>,
) -> Result<(), Box<dyn Error + Send + Sync>>;
fn handle_call(
&self,
actor: &str,
op: &str,
msg: &[u8],
) -> Result<Vec<u8>, Box<dyn Error + Send + Sync>>;
fn stop(&self);
}Expand description
Every native capability provider must implement this trait. Both portable and native capability providers
must respond to the following operations: OP_BIND_ACTOR, OP_REMOVE_ACTOR, OP_GET_CAPABILITY_DESCRIPTOR
Required Methods§
Sourcefn configure_dispatch(
&self,
dispatcher: Box<dyn Dispatcher>,
) -> Result<(), Box<dyn Error + Send + Sync>>
fn configure_dispatch( &self, dispatcher: Box<dyn Dispatcher>, ) -> Result<(), Box<dyn Error + Send + Sync>>
This function will be called on the provider when the host runtime is ready and has configured a dispatcher. This function is only ever called once for a capability provider, regardless of the number of actors being managed in the host