Struct tower::reconnect::Reconnect[][src]

pub struct Reconnect<M, Target> where
    M: Service<Target>, 
{ /* fields omitted */ }
This is supported on crate feature reconnect only.

Reconnect to failed services.

Implementations

impl<M, Target> Reconnect<M, Target> where
    M: Service<Target>, 
[src]

pub fn new<S, Request>(mk_service: M, target: Target) -> Self[src]

Lazily connect and reconnect to a Service.

pub fn with_connection(
    init_conn: M::Response,
    mk_service: M,
    target: Target
) -> Self
[src]

Reconnect to a already connected Service.

Trait Implementations

impl<M, Target> Debug for Reconnect<M, Target> where
    M: Service<Target> + Debug,
    M::Future: Debug,
    M::Response: Debug,
    Target: Debug
[src]

impl<M, Target, S, Request> Service<Request> for Reconnect<M, Target> where
    M: Service<Target, Response = S>,
    S: Service<Request>,
    M::Future: Unpin,
    BoxError: From<M::Error> + From<S::Error>,
    Target: Clone
[src]

type Response = S::Response

Responses given by the service.

type Error = BoxError

Errors produced by the service.

type Future = ResponseFuture<S::Future, M::Error>

The future response value.

Auto Trait Implementations

impl<M, Target> RefUnwindSafe for Reconnect<M, Target> where
    M: RefUnwindSafe,
    Target: RefUnwindSafe,
    <M as Service<Target>>::Error: RefUnwindSafe,
    <M as Service<Target>>::Future: RefUnwindSafe,
    <M as Service<Target>>::Response: RefUnwindSafe

impl<M, Target> Send for Reconnect<M, Target> where
    M: Send,
    Target: Send,
    <M as Service<Target>>::Error: Send,
    <M as Service<Target>>::Future: Send,
    <M as Service<Target>>::Response: Send

impl<M, Target> Sync for Reconnect<M, Target> where
    M: Sync,
    Target: Sync,
    <M as Service<Target>>::Error: Sync,
    <M as Service<Target>>::Future: Sync,
    <M as Service<Target>>::Response: Sync

impl<M, Target> Unpin for Reconnect<M, Target> where
    M: Unpin,
    Target: Unpin,
    <M as Service<Target>>::Error: Unpin,
    <M as Service<Target>>::Future: Unpin,
    <M as Service<Target>>::Response: Unpin

impl<M, Target> UnwindSafe for Reconnect<M, Target> where
    M: UnwindSafe,
    Target: UnwindSafe,
    <M as Service<Target>>::Error: UnwindSafe,
    <M as Service<Target>>::Future: UnwindSafe,
    <M as Service<Target>>::Response: UnwindSafe

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

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

impl<T, Request> ServiceExt<Request> for T where
    T: Service<Request> + ?Sized
[src]

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

type Error = Infallible

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<V, T> VZip<V> for T where
    V: MultiLane<T>,