[][src]Struct hyper_srv::ServiceConnector

pub struct ServiceConnector<C> { /* fields omitted */ }

A wrapper around Hyper's Connector 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]

impl<C> Connect for ServiceConnector<C> where
    C: Connect
[src]

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.

Auto Trait Implementations

impl<C> Send for ServiceConnector<C> where
    C: Send + Sync

impl<C> Sync for ServiceConnector<C> where
    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]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,