Trait exc_core::ExcServiceExt
source · 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§
sourcefn into_service(self) -> IntoService<Self, R>where
Self: Sized,
fn into_service(self) -> IntoService<Self, R>where
Self: Sized,
Convert into a [Service
].
sourcefn apply<L, R2>(self, layer: &L) -> <L as Layer<Self>>::Service
fn apply<L, R2>(self, layer: &L) -> <L as Layer<Self>>::Service
Apply a layer of which the result service is still a ExcService
.
sourcefn rate_limited(
self,
num: u64,
per: Duration
) -> RateLimit<IntoService<Self, R>>where
Self: Sized,
fn rate_limited(
self,
num: u64,
per: Duration
) -> RateLimit<IntoService<Self, R>>where
Self: Sized,
Apply a rate-limit layer to the service.
sourcefn retry(self, max_duration: Duration) -> Retry<Always, IntoService<Self, R>>
fn retry(self, max_duration: Duration) -> Retry<Always, IntoService<Self, R>>
Apply a retry layer to the service.
sourcefn boxed(self) -> BoxExcService<R>
fn boxed(self) -> BoxExcService<R>
Create a boxed ExcService
.
sourcefn boxed_clone(&self) -> BoxCloneExcService<R>
fn boxed_clone(&self) -> BoxCloneExcService<R>
Create a boxed ExcService
with Clone
.