1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-12-22 16:16:40 +00: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 { > + Clone {
move || -> FutureResult<Connector<T>, E> { ok(Connector::new(cfg.clone(), opts)) } 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> { impl<T> Clone for Connector<T> {