Trait fibers_http_client::connection::AcquireConnection [−][src]
pub trait AcquireConnection { type Connection: AsMut<Connection>; type Future: Future<Item = Self::Connection, Error = Error>; fn acquire_connection(&mut self, addr: SocketAddr) -> Self::Future; }
This trait allows for acquiring TCP connections.
Associated Types
type Connection: AsMut<Connection>
TCP connection.
type Future: Future<Item = Self::Connection, Error = Error>
Future
for acquiring a connection to communicate with the specified TCP server.
Required Methods
fn acquire_connection(&mut self, addr: SocketAddr) -> Self::Future
Returns a Future
for acquiring a connection to communicate with the specified TCP server.
Implementors
impl AcquireConnection for ConnectionPoolHandle type Connection = RentedConnection; type Future = Box<Future<Item = Self::Connection, Error = Error> + Send + 'static>;
impl AcquireConnection for Oneshot type Connection = Connection; type Future = Box<Future<Item = Connection, Error = Error> + Send + 'static>;