1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-12-22 16:16:40 +00:00

create Connector with custom Resolver

This commit is contained in:
Nikolay Kim 2018-09-10 19:42:51 -07:00
parent 88d8c99e31
commit d8ed9ae43a

View file

@ -63,6 +63,16 @@ impl<T: HostAware> Connector<T> {
} }
} }
pub fn with_resolver(
resolver: Resolver<T>,
) -> impl Service<
Request = T,
Response = (T, ConnectionInfo, TcpStream),
Error = ConnectorError,
> + Clone {
Connector { resolver }
}
pub fn new_service<E>() -> impl NewService< pub fn new_service<E>() -> impl NewService<
Request = T, Request = T,
Response = (T, ConnectionInfo, TcpStream), Response = (T, ConnectionInfo, TcpStream),