Struct hyper_srv::ServiceConnector [−][src]
pub struct ServiceConnector<C> { /* fields omitted */ }
Expand description
A wrapper around Hyper’s Connect
or with ability to preresolve SRV DNS records
before supplying resulting host:port
pair to the underlying connector.
Implementations
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
type Error = ServiceError
type Error = ServiceError
Errors produced by the service.
type Future = ServiceConnecting<C>
type Future = ServiceConnecting<C>
The future response value.
Returns Poll::Ready(Ok(()))
when the service is able to process requests. Read more
Auto Trait Implementations
impl<C> !RefUnwindSafe for ServiceConnector<C>
impl<C> Send for ServiceConnector<C> where
C: Send,
impl<C> Sync for ServiceConnector<C> where
C: Sync,
impl<C> Unpin for ServiceConnector<C> where
C: Unpin,
impl<C> !UnwindSafe for ServiceConnector<C>
Blanket Implementations
Mutably borrows from an owned value. Read more