pub trait Plugin:
Send
+ Sync
+ 'static {
// Required method
fn call<'a>(
&'a self,
cx: &'a Cx,
method: &'a str,
params: Value,
) -> BoxFuture<'a, Result<Value, Refusal>>;
// Provided method
fn capabilities(&self) -> Value { ... }
}Expand description
A plugin: what it can do, and its answer to each method but the handshake’s.
Required Methods§
fn call<'a>( &'a self, cx: &'a Cx, method: &'a str, params: Value, ) -> BoxFuture<'a, Result<Value, Refusal>>
Provided Methods§
Sourcefn capabilities(&self) -> Value
fn capabilities(&self) -> Value
What initialize answers it can do.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".