[−][src]Struct hyper_srv::ServiceConnector
A wrapper around Hyper's Connect
or with ability to preresolve SRV DNS records
before supplying resulting host:port
pair to the underlying connector.
Methods
impl<C> ServiceConnector<C>
[src]
pub fn new(inner: C, resolver: Option<AsyncResolver>) -> Self
[src]
Creates a new instance of ServiceConnector
with provided connector and
optional DNS resolver. If the resolver is set to None all connections will be
handled directly by the underlying connector. This allows to toggle SRV resolving
mechanism without changing a type of connector used
in a client (as it must be named and can not even be made into a trait object).
Trait Implementations
impl<C> Debug for ServiceConnector<C> where
C: Debug,
[src]
C: Debug,
impl<C> Connect for ServiceConnector<C> where
C: Connect,
[src]
C: Connect,
type Transport = C::Transport
The connected IO Stream.
type Error = ServiceError
An error occured when trying to connect.
type Future = ServiceConnecting<C>
A Future that will resolve to the connected Transport.
fn connect(&self, dst: Destination) -> Self::Future
[src]
Auto Trait Implementations
impl<C> Send for ServiceConnector<C> where
C: Send + Sync,
C: Send + Sync,
impl<C> Sync for ServiceConnector<C> where
C: Send + Sync,
C: Send + Sync,
impl<C> Unpin for ServiceConnector<C>
impl<C> !UnwindSafe for ServiceConnector<C>
impl<C> !RefUnwindSafe for ServiceConnector<C>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,