Struct ntex::service::dev::FnMutService [−][src]
pub struct FnMutService<F, Fut, Req, Res, Err> where
F: FnMut(Req) -> Fut,
Fut: Future<Output = Result<Res, Err>>, { /* fields omitted */ }
Trait Implementations
type Request = Req
type Request = Req
Requests handled by the service.
type Response = Res
type Response = Res
Responses given by the service.
type Error = Err
type Error = Err
Errors produced by the service.
type Future = Fut
type Future = Fut
The future response value.
pub fn poll_ready(
&self,
&mut Context<'_>
) -> Poll<Result<(), <FnMutService<F, Fut, Req, Res, Err> as Service>::Error>>
pub fn poll_ready(
&self,
&mut Context<'_>
) -> Poll<Result<(), <FnMutService<F, Fut, Req, Res, Err> as Service>::Error>>
Returns Ready
when the service is able to process requests. Read more
Process the request and return the response asynchronously. Read more
Shutdown service. Read more
Map this service’s output to a different type, returning a new service of the resulting type. Read more
Auto Trait Implementations
impl<F, Fut, Req, Res, Err> !RefUnwindSafe for FnMutService<F, Fut, Req, Res, Err>
impl<F, Fut, Req, Res, Err> Send for FnMutService<F, Fut, Req, Res, Err> where
F: Send,
Req: Send,
impl<F, Fut, Req, Res, Err> !Sync for FnMutService<F, Fut, Req, Res, Err>
impl<F, Fut, Req, Res, Err> Unpin for FnMutService<F, Fut, Req, Res, Err> where
F: Unpin,
Req: Unpin,
impl<F, Fut, Req, Res, Err> UnwindSafe for FnMutService<F, Fut, Req, Res, Err> where
F: UnwindSafe,
Req: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Convert to a Service
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more