mesh_rpc::client

Trait Dial

Source
pub trait Dial: 'static + Send {
    type Stream: 'static + Send + AsyncRead + AsyncWrite;

    // Required method
    fn dial(&mut self) -> impl Future<Output = Result<Self::Stream>> + Send;
}
Expand description

Dials a connection to a server.

Required Associated Types§

Source

type Stream: 'static + Send + AsyncRead + AsyncWrite

A bidirectional byte stream connection to the server.

Required Methods§

Source

fn dial(&mut self) -> impl Future<Output = Result<Self::Stream>> + Send

Connects to the server.

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§

Source§

impl<T: 'static + Send + AsyncRead + AsyncWrite> Dial for ExistingConnection<T>

Source§

impl<T: Driver> Dial for UnixDialier<T>