mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-24 01:11:07 +01:00
allow to change Connector's request type
This commit is contained in:
parent
061a0339ff
commit
eaa9d4b273
@ -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 New Issue
Block a user