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:
parent
061a0339ff
commit
eaa9d4b273
1 changed files with 7 additions and 0 deletions
|
@ -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> {
|
||||||
|
|
Loading…
Reference in a new issue