pub struct FnNewService<F, Req, Resp, Err, Fut> where
F: FnMut(Req) -> Fut,
Fut: IntoFuture<Item = Resp, Error = Err>, { /* fields omitted */ }
impl<F, Req, Resp, Err, Fut> FnNewService<F, Req, Resp, Err, Fut> where F: FnMut(Req) -> Fut + Clone, Fut: IntoFuture<Item = Resp, Error = Err>, | [src] |
impl<F, Req, Resp, Err, Fut> NewService<Req> for FnNewService<F, Req, Resp, Err, Fut> where F: FnMut(Req) -> Fut + Clone, Fut: IntoFuture<Item = Resp, Error = Err>, | [src] |
Responses given by the service
type Error = Err
Errors produced by the service
The Service
value created by this factory
Errors produced while building a service.
The future of the Service
instance.
Create and return a new service value asynchronously.
fn apply<T, I, F, Out, Req>( self, service: I, f: F ) -> AndThenNewService<Self, ApplyNewService<T, F, Self::Response, Out, Req>> where Self: Sized, T: NewService<Req, InitError = Self::InitError, Error = Self::Error>, I: IntoNewService<T, Req>, F: Fn(Self::Response, &mut T::Service) -> Out + Clone, Out: IntoFuture<Error = Self::Error>, | [src] |
Apply function to specified service and use it as a next service in chain. Read more
Call another service after call to this one has resolved successfully.
NewService
that create service to map this service's error and new service's init error to any error implementing From
for this services
Error`. Read more
fn then<F, B>(self, new_service: F) -> ThenNewService<Self, B> where Self: Sized, F: IntoNewService<B, Result<Self::Response, Self::Error>>, B: NewService<Result<Self::Response, Self::Error>, Error = Self::Error, InitError = Self::InitError>, | [src] |
Create NewService
to chain on a computation for when a call to the service finished, passing the result of the call to the next service B
. Read more
Map this service's output to a different type, returning a new service of the resulting type. Read more
Map this service's error to a different error, returning a new service.
Map this service's init error to a different error, returning a new service.
impl<F, Req, Resp, Err, Fut> IntoNewService<FnNewService<F, Req, Resp, Err, Fut>, Req> for F where F: FnMut(Req) -> Fut + Clone + 'static, Fut: IntoFuture<Item = Resp, Error = Err>, | [src] |
impl<F, Req, Resp, Err, Fut> Clone for FnNewService<F, Req, Resp, Err, Fut> where F: FnMut(Req) -> Fut + Clone, Fut: IntoFuture<Item = Resp, Error = Err>, | [src] |
Performs copy-assignment from source
. Read more
impl<F, Req, Resp, Err, Fut> Send for FnNewService<F, Req, Resp, Err, Fut> where Err: Send, F: Send, Req: Send, Resp: Send, | |
impl<F, Req, Resp, Err, Fut> Sync for FnNewService<F, Req, Resp, Err, Fut> where Err: Sync, F: Sync, Req: Sync, Resp: Sync, | |
Responses given by the service
Errors produced by the service
The Service
value created by this factory
Errors produced while building a service.
The future of the Service
instance.
Create and return a new service value asynchronously.
fn apply<T, I, F, Out, Req>( self, service: I, f: F ) -> AndThenNewService<Self, ApplyNewService<T, F, Self::Response, Out, Req>> where Self: Sized, T: NewService<Req, InitError = Self::InitError, Error = Self::Error>, I: IntoNewService<T, Req>, F: Fn(Self::Response, &mut T::Service) -> Out + Clone, Out: IntoFuture<Error = Self::Error>, | [src] |
Apply function to specified service and use it as a next service in chain. Read more
Call another service after call to this one has resolved successfully.
NewService
that create service to map this service's error and new service's init error to any error implementing From
for this services
Error`. Read more
fn then<F, B>(self, new_service: F) -> ThenNewService<Self, B> where Self: Sized, F: IntoNewService<B, Result<Self::Response, Self::Error>>, B: NewService<Result<Self::Response, Self::Error>, Error = Self::Error, InitError = Self::InitError>, | [src] |
Create NewService
to chain on a computation for when a call to the service finished, passing the result of the call to the next service B
. Read more
Map this service's output to a different type, returning a new service of the resulting type. Read more
Map this service's error to a different error, returning a new service.
Map this service's init error to a different error, returning a new service.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)