pub trait ExcServiceExt<R>: ExcService<R>
where R: Request,
{ // Provided methods fn into_service(self) -> IntoService<Self, R> where Self: Sized { ... } fn apply<L, R2>(self, layer: &L) -> <L as Layer<Self>>::Service where Self: Sized, R2: Request, L: Layer<Self>, <L as Layer<Self>>::Service: ExcService<R2> { ... } fn adapt<R2>(self) -> Adapt<Self, R, R2> where Self: Sized + AdaptService<R, R2>, R2: Request { ... } fn rate_limited( self, num: u64, per: Duration ) -> RateLimit<IntoService<Self, R>> where Self: Sized { ... } fn retry( self, max_duration: Duration ) -> Retry<Always, IntoService<Self, R>> where R: Clone, Self: Sized + Clone { ... } fn boxed(self) -> BoxExcService<R> where Self: Sized + Send + 'static, R: Send + 'static, Self::Future: Send + 'static { ... } fn boxed_clone(&self) -> BoxCloneExcService<R> where R: Send + 'static, Self: Sized + Clone + Send + 'static, Self::Future: Send + 'static { ... } }
Expand description

Extension trait for ExcService.

Provided Methods§

source

fn into_service(self) -> IntoService<Self, R>
where Self: Sized,

Convert into a [Service].

source

fn apply<L, R2>(self, layer: &L) -> <L as Layer<Self>>::Service
where Self: Sized, R2: Request, L: Layer<Self>, <L as Layer<Self>>::Service: ExcService<R2>,

Apply a layer of which the result service is still a ExcService.

source

fn adapt<R2>(self) -> Adapt<Self, R, R2>
where Self: Sized + AdaptService<R, R2>, R2: Request,

Adapt the request type to the given.

source

fn rate_limited( self, num: u64, per: Duration ) -> RateLimit<IntoService<Self, R>>
where Self: Sized,

Apply a rate-limit layer to the service.

source

fn retry(self, max_duration: Duration) -> Retry<Always, IntoService<Self, R>>
where R: Clone, Self: Sized + Clone,

Apply a retry layer to the service.

source

fn boxed(self) -> BoxExcService<R>
where Self: Sized + Send + 'static, R: Send + 'static, Self::Future: Send + 'static,

Create a boxed ExcService.

source

fn boxed_clone(&self) -> BoxCloneExcService<R>
where R: Send + 'static, Self: Sized + Clone + Send + 'static, Self::Future: Send + 'static,

Create a boxed ExcService with Clone.

Implementors§

source§

impl<S, R> ExcServiceExt<R> for S
where S: ExcService<R>, R: Request,