pub struct FnShutdown<Req, Err, F> { /* private fields */ }Trait Implementations§
Source§impl<Req, Err, F> Clone for FnShutdown<Req, Err, F>where
F: Clone,
impl<Req, Err, F> Clone for FnShutdown<Req, Err, F>where
F: Clone,
Source§impl<Req, Err, F> Debug for FnShutdown<Req, Err, F>
impl<Req, Err, F> Debug for FnShutdown<Req, Err, F>
Source§impl<Req, Err, F> Service<Req> for FnShutdown<Req, Err, F>where
F: AsyncFnOnce(),
impl<Req, Err, F> Service<Req> for FnShutdown<Req, Err, F>where
F: AsyncFnOnce(),
Source§async fn call(&self, req: Req, _: ServiceCtx<'_, Self>) -> Result<Req, Err>
async fn call(&self, req: Req, _: ServiceCtx<'_, Self>) -> Result<Req, Err>
Process the request and return the response asynchronously. Read more
Source§async fn ready(&self, ctx: ServiceCtx<'_, Self>) -> Result<(), Self::Error>
async fn ready(&self, ctx: ServiceCtx<'_, Self>) -> Result<(), Self::Error>
Returns when the service is able to process requests. Read more
Source§fn poll(&self, cx: &mut Context<'_>) -> Result<(), Self::Error>
fn poll(&self, cx: &mut Context<'_>) -> Result<(), Self::Error>
Polls service from the current task. Read more
Source§impl<Req, Err, C, F> ServiceFactory<Req, C> for FnShutdown<Req, Err, F>where
F: AsyncFnOnce() + Clone,
impl<Req, Err, C, F> ServiceFactory<Req, C> for FnShutdown<Req, Err, F>where
F: AsyncFnOnce() + Clone,
Source§type Service = FnShutdown<Req, Err, F>
type Service = FnShutdown<Req, Err, F>
The kind of
Service created by this factory.Source§async fn create(&self, _: C) -> Result<Self::Service, Self::InitError>
async fn create(&self, _: C) -> Result<Self::Service, Self::InitError>
Create and return a new service value asynchronously.
Source§async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
Create and return a new service value asynchronously and wrap into a container
Source§fn map<F, Res>(
self,
f: F,
) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
fn map<F, Res>( self, f: F, ) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
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,
) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
Map this service’s error to a different error, returning a new service.
Source§fn map_init_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_init_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
Map this factory’s init error to a different error, returning a new service.
Auto Trait Implementations§
impl<Req, Err, F> !Freeze for FnShutdown<Req, Err, F>
impl<Req, Err, F> !RefUnwindSafe for FnShutdown<Req, Err, F>
impl<Req, Err, F> Send for FnShutdown<Req, Err, F>
impl<Req, Err, F> !Sync for FnShutdown<Req, Err, F>
impl<Req, Err, F> Unpin for FnShutdown<Req, Err, F>
impl<Req, Err, F> UnwindSafe for FnShutdown<Req, Err, F>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Svc, Req> IntoService<Svc, Req> for Svcwhere
Svc: Service<Req>,
impl<Svc, Req> IntoService<Svc, Req> for Svcwhere
Svc: Service<Req>,
Source§fn into_service(self) -> Svc
fn into_service(self) -> Svc
Convert to a
ServiceSource§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