Trait RPCPort

Source
pub trait RPCPort {
    // Required methods
    fn sink(&self) -> impl RPCSink + Clone + Send + 'static;
    fn progress(
        &mut self,
    ) -> impl Future<Output = Result<Option<JSONRPCMessage>>> + Send;
}

Required Methods§

Source

fn sink(&self) -> impl RPCSink + Clone + Send + 'static

Get the sink for sending messages to the peer.

Source

fn progress( &mut self, ) -> impl Future<Output = Result<Option<JSONRPCMessage>>> + Send

Fetch a message from the peer. Handling commands in the background which sent by the RPCSink.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§