Skip to main content

RemoteQueryTransport

Trait RemoteQueryTransport 

Source
pub trait RemoteQueryTransport:
    Send
    + Sync
    + 'static {
    // Required methods
    fn capabilities(
        &self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + '_>>;
    fn exchange<'a>(
        &'a self,
        request: &'a [u8],
    ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'a>>;
}
Expand description

One caller-owned asynchronous transport for the authenticated V2 routes.

Implementations fetch the exact /v2/capabilities bytes once at connect time and perform exactly one /v2/query exchange per terminal.

Required Methods§

Source

fn capabilities( &self, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + '_>>

Fetch the executor’s exact signed capability advertisement.

Source

fn exchange<'a>( &'a self, request: &'a [u8], ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'a>>

Exchange one exact canonical request for one exact signed reply.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§