mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-23 22:51:07 +01:00
create Connector with custom Resolver
This commit is contained in:
parent
88d8c99e31
commit
d8ed9ae43a
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user