pub struct KeepAlive<R, E, F> { /* private fields */ }Expand description
KeepAlive service factory
Controls min time between requests.
Implementations§
Trait Implementations§
source§impl<R, E, F, C: 'static> ServiceFactory<R, C> for KeepAlive<R, E, F>where
F: Fn() -> E + Clone,
impl<R, E, F, C: 'static> ServiceFactory<R, C> for KeepAlive<R, E, F>where
F: Fn() -> E + Clone,
§type InitError = Infallible
type InitError = Infallible
Errors potentially raised while building a service.
§type Service = KeepAliveService<R, E, F>
type Service = KeepAliveService<R, E, F>
The kind of
Service created by this factory.§type Future<'f>
where
Self: 'f,
C: 'f = Ready<<KeepAlive<R, E, F> as ServiceFactory<R, C>>::Service, <KeepAlive<R, E, F> as ServiceFactory<R, C>>::InitError>
type Future<'f>
where
Self: 'f,
C: 'f = Ready<<KeepAlive<R, E, F> as ServiceFactory<R, C>>::Service, <KeepAlive<R, E, F> as ServiceFactory<R, C>>::InitError>
The future of the
ServiceFactory instance.source§fn create(&self, _: C) -> Self::Future<'_>
fn create(&self, _: C) -> Self::Future<'_>
Create and return a new service value asynchronously.
source§fn map<F, Res>(self, f: F) -> MapFactory<Self, F, Req, Res, Cfg>where
Self: Sized,
F: Fn(Self::Response) -> Res + Clone,
fn map<F, Res>(self, f: F) -> MapFactory<Self, F, Req, Res, Cfg>where
Self: Sized,
F: Fn(Self::Response) -> Res + Clone,
Map this service’s output to a different type, returning a new service
of the resulting type.
source§fn map_err<F, E>(self, f: F) -> MapErrFactory<Self, Req, Cfg, F, E>where
Self: Sized,
F: Fn(Self::Error) -> E + Clone,
fn map_err<F, E>(self, f: F) -> MapErrFactory<Self, Req, Cfg, F, E>where
Self: Sized,
F: Fn(Self::Error) -> E + Clone,
Map this service’s error to a different error, returning a new service.
source§fn map_init_err<F, E>(self, f: F) -> MapInitErr<Self, Req, Cfg, F, E>where
Self: Sized,
F: Fn(Self::InitError) -> E + Clone,
fn map_init_err<F, E>(self, f: F) -> MapInitErr<Self, Req, Cfg, F, E>where
Self: Sized,
F: Fn(Self::InitError) -> E + Clone,
Map this factory’s init error to a different error, returning a new service.
Auto Trait Implementations§
impl<R, E, F> RefUnwindSafe for KeepAlive<R, E, F>where
E: RefUnwindSafe,
F: RefUnwindSafe,
R: RefUnwindSafe,
impl<R, E, F> Send for KeepAlive<R, E, F>where
E: Send,
F: Send,
R: Send,
impl<R, E, F> Sync for KeepAlive<R, E, F>where
E: Sync,
F: Sync,
R: Sync,
impl<R, E, F> Unpin for KeepAlive<R, E, F>where
E: Unpin,
F: Unpin,
R: Unpin,
impl<R, E, F> UnwindSafe for KeepAlive<R, E, F>where
E: UnwindSafe,
F: UnwindSafe,
R: UnwindSafe,
Blanket Implementations§
source§impl<T, Req, Cfg> IntoServiceFactory<T, Req, Cfg> for Twhere
T: ServiceFactory<Req, Cfg>,
impl<T, Req, Cfg> IntoServiceFactory<T, Req, Cfg> for Twhere
T: ServiceFactory<Req, Cfg>,
source§fn into_factory(self) -> T
fn into_factory(self) -> T
Convert
Self to a ServiceFactory