pub struct AsyncServiceChainBuilder<P: AsyncService, S: AsyncService<Input = P::Output>> { /* private fields */ }Expand description
Returned by ServiceChain::start_async to build an async service chain.
Use the next(self, AsyncService) function to append more services to the ServiceChain.
Use the end(self) function to finish building and return the resulting ServiceChain.
Implementations§
Source§impl<P: AsyncService + Send + Sync, S: AsyncService<Input = P::Output> + Send + Sync> AsyncServiceChainBuilder<P, S>
impl<P: AsyncService + Send + Sync, S: AsyncService<Input = P::Output> + Send + Sync> AsyncServiceChainBuilder<P, S>
Sourcepub fn next<NS: AsyncService<Input = S::Output>>(
self,
service: NS,
) -> AsyncServiceChainBuilder<ServiceChain<P, S>, NS>
pub fn next<NS: AsyncService<Input = S::Output>>( self, service: NS, ) -> AsyncServiceChainBuilder<ServiceChain<P, S>, NS>
Append another AsyncService to the end of the service chain.
Source§impl<P: AsyncService + Send + Sync, S: AsyncService<Input = P::Output> + Send + Sync> AsyncServiceChainBuilder<P, S>
impl<P: AsyncService + Send + Sync, S: AsyncService<Input = P::Output> + Send + Sync> AsyncServiceChainBuilder<P, S>
Sourcepub fn fork_clone<NS1: AsyncService<Input = S::Output> + Send + Sync, NS2: AsyncService<Input = S::Output, Error = NS1::Error> + Send + Sync>(
self,
first: NS1,
second: NS2,
) -> AsyncServiceChainBuilder<ServiceChain<P, S>, CloningForkService<NS1, NS2>>
pub fn fork_clone<NS1: AsyncService<Input = S::Output> + Send + Sync, NS2: AsyncService<Input = S::Output, Error = NS1::Error> + Send + Sync>( self, first: NS1, second: NS2, ) -> AsyncServiceChainBuilder<ServiceChain<P, S>, CloningForkService<NS1, NS2>>
Fork the service chain to the given two services by cloning the input.
Source§impl<'a, P: AsyncService + Send + Sync + 'a, S: AsyncService<Input = P::Output> + Send + Sync + 'a> AsyncServiceChainBuilder<P, S>
impl<'a, P: AsyncService + Send + Sync + 'a, S: AsyncService<Input = P::Output> + Send + Sync + 'a> AsyncServiceChainBuilder<P, S>
Sourcepub fn end(self) -> ServiceChain<P, S>
pub fn end(self) -> ServiceChain<P, S>
End and return the resulting ServiceChain.
Auto Trait Implementations§
impl<P, S> Freeze for AsyncServiceChainBuilder<P, S>
impl<P, S> RefUnwindSafe for AsyncServiceChainBuilder<P, S>where
P: RefUnwindSafe,
S: RefUnwindSafe,
impl<P, S> Send for AsyncServiceChainBuilder<P, S>
impl<P, S> Sync for AsyncServiceChainBuilder<P, S>
impl<P, S> Unpin for AsyncServiceChainBuilder<P, S>
impl<P, S> UnwindSafe for AsyncServiceChainBuilder<P, S>where
P: UnwindSafe,
S: UnwindSafe,
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