Trait tk_pool::Connect
[−]
[src]
pub trait Connect { type Future: Future; fn connect(&mut self, address: SocketAddr) -> Self::Future; }
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) -> Self::Future
Establish a connection to the specified address
Implementors
impl<T, F> Connect for T where
T: FnMut(SocketAddr) -> F,
F: IntoFuture, type Future = <T::Output as IntoFuture>::Future;