[−][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: Clone> Clone for ServiceConnector<C>
[src]
fn clone(&self) -> ServiceConnector<C>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<C: Debug> Debug for ServiceConnector<C>
[src]
impl<C> Service<Uri> for ServiceConnector<C> where
C: Service<Uri> + Clone + Unpin,
C::Response: AsyncRead + AsyncWrite + Connection + Unpin + Send + 'static,
C::Error: Into<Box<dyn Error + Send + Sync>>,
C::Future: Unpin + Send,
[src]
C: Service<Uri> + Clone + Unpin,
C::Response: AsyncRead + AsyncWrite + Connection + Unpin + Send + 'static,
C::Error: Into<Box<dyn Error + Send + Sync>>,
C::Future: Unpin + Send,
type Response = C::Response
Responses given by the service.
type Error = ServiceError
Errors produced by the service.
type Future = ServiceConnecting<C>
The future response value.
fn poll_ready(&mut self, ctx: &mut Context) -> Poll<Result<(), Self::Error>>
[src]
fn call(&mut self, uri: Uri) -> Self::Future
[src]
Auto Trait Implementations
impl<C> !RefUnwindSafe for ServiceConnector<C>
impl<C> Send for ServiceConnector<C> where
C: Send,
C: Send,
impl<C> Sync for ServiceConnector<C> where
C: Sync,
C: Sync,
impl<C> Unpin for ServiceConnector<C> where
C: Unpin,
C: Unpin,
impl<C> !UnwindSafe for ServiceConnector<C>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,