1
0
mirror of https://github.com/fafhrd91/actix-net synced 2024-11-23 22:51:07 +01:00

allow to change Connector's request type

This commit is contained in:
Nikolay Kim 2018-08-30 10:06:47 -07:00
parent 061a0339ff
commit eaa9d4b273

View File

@ -92,6 +92,13 @@ impl<T: HostAware> Connector<T> {
> + Clone {
move || -> FutureResult<Connector<T>, E> { ok(Connector::new(cfg.clone(), opts)) }
}
pub fn change_request<T2: HostAware>(&self) -> Connector<T2> {
Connector {
resolver: self.resolver.clone(),
req: PhantomData,
}
}
}
impl<T> Clone for Connector<T> {