Trait tk_pool::Connect
[−]
[src]
pub trait Connect {
type Sink;
type Error;
fn connect(&mut self,
address: SocketAddr)
-> Box<Future<Item=Self::Sink, Error=Self::Error>>;
}This is a trait that is used for establishing a connection
Usually just passing a closure is good enough
Associated Types
Required Methods
fn connect(&mut self,
address: SocketAddr)
-> Box<Future<Item=Self::Sink, Error=Self::Error>>
address: SocketAddr)
-> Box<Future<Item=Self::Sink, Error=Self::Error>>
Establish a connection to the specified address
Implementors
impl<S, E, T> Connect for T where T: FnMut(SocketAddr) -> Box<Future<Item=S, Error=E>>