[][src]Trait fizyr_rpc::util::Connect

pub trait Connect<'a, Address: 'a>: Sized + Transport {
    type Future: Future<Output = Result<Self>>;
    fn connect(address: Address, config: Self::Config) -> Self::Future;
}

Trait for connecting transports to a remote address.

Associated Types

type Future: Future<Output = Result<Self>>[src]

The type of the future returned by Self::connect.

Loading content...

Required methods

fn connect(address: Address, config: Self::Config) -> Self::Future[src]

Create a new transport connected to a remote address.

Loading content...

Implementors

impl<'a, Address> Connect<'a, Address> for StreamTransport<TcpStream> where
    Address: ToSocketAddrs + 'a, 
[src]

type Future = Pin<Box<dyn Future<Output = Result<Self>> + 'a>>

impl<'a, Address> Connect<'a, Address> for StreamTransport<UnixStream> where
    Address: AsRef<Path> + 'a, 
[src]

type Future = Pin<Box<dyn Future<Output = Result<Self>> + 'a>>

impl<'a, Address> Connect<'a, Address> for UnixTransport<UnixSeqpacket> where
    Address: AsRef<Path> + 'a, 
[src]

type Future = Pin<Box<dyn Future<Output = Result<Self>> + 'a>>

Loading content...