mirror of
https://github.com/actix/actix-web.git
synced 2024-12-21 23:56:35 +00:00
create Connector with custom Resolver
This commit is contained in:
parent
88d8c99e31
commit
d8ed9ae43a
1 changed files with 10 additions and 0 deletions
|
@ -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 a new issue