1
0
mirror of https://github.com/fafhrd91/actix-net synced 2024-11-24 01:11:07 +01: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<
Request = T,
Response = (T, ConnectionInfo, TcpStream),