Skip to main content

LocalBackend

Trait LocalBackend 

Source
pub trait LocalBackend:
    Send
    + Sync
    + Debug {
    // Required method
    fn run<'a>(
        &'a self,
        invocation: Invocation,
    ) -> BoxFuture<'a, Result<Output, ExecError>>;
}
Expand description

The local node, as the tools see it.

One method, so that a fake is a dozen lines. dyn-compatible by hand-rolling the boxed future rather than taking an async fn in the trait.

Required Methods§

Source

fn run<'a>( &'a self, invocation: Invocation, ) -> BoxFuture<'a, Result<Output, ExecError>>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T: LocalBackend + ?Sized> LocalBackend for Arc<T>

Source§

fn run<'a>( &'a self, invocation: Invocation, ) -> BoxFuture<'a, Result<Output, ExecError>>

Implementors§