[][src]Struct tower_reconnect::Reconnect

pub struct Reconnect<M, Target> where
    M: Service<Target>, 
{ /* fields omitted */ }

Methods

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

pub fn new<S, Request>(mk_service: M, target: Target) -> Self where
    M: Service<Target, Response = S>,
    S: Service<Request>,
    Box<dyn Error + Send + Sync>: From<M::Error> + From<S::Error>,
    Target: Clone
[src]

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,
    Box<dyn Error + Send + Sync>: From<M::Error> + From<S::Error>,
    Target: Clone
[src]

type Response = S::Response

Responses given by the service.

type Error = Box<dyn Error + Send + Sync>

Errors produced by the service.

type Future = ResponseFuture<S::Future>

The future response value.

Auto Trait Implementations

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

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

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

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

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

Blanket Implementations

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

impl<T> From<T> for T[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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<M, S, Target, Request> MakeService<Target, Request> for M where
    M: Service<Target, Response = S>,
    S: Service<Request>, 
[src]

type Response = <S as Service<Request>>::Response

Responses given by the service

type Error = <S as Service<Request>>::Error

Errors produced by the service

type Service = S

The Service value created by this factory

type MakeError = <M as Service<Target>>::Error

Errors produced while building a service.

type Future = <M as Service<Target>>::Future

The future of the Service instance.