Skip to main content

Plugin

Trait Plugin 

Source
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§

Source

fn call<'a>( &'a self, cx: &'a Cx, method: &'a str, params: Value, ) -> BoxFuture<'a, Result<Value, Refusal>>

Provided Methods§

Source

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".

Implementors§