AsyncServiceChainBuilder

Struct AsyncServiceChainBuilder 

Source
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>
where P::Error: Debug + Send, S::Error: Debug + Send, P::Output: Send, S::Output: Send,

Source

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>
where P::Error: Debug + Send, S::Error: Debug + Send, P::Output: Send, S::Output: Send + Clone + Sync,

Source

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>>
where <NS1 as AsyncService>::Output: Send + Sync, <NS2 as AsyncService>::Output: Send + Sync,

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>
where P::Error: Send + Debug + 'static, S::Error: Send + Debug + 'static, P::Output: Send + 'a, S::Output: Send + 'a,

Source

pub fn end(self) -> ServiceChain<P, S>

End and return the resulting ServiceChain.

Auto Trait Implementations§

§

impl<P, S> Freeze for AsyncServiceChainBuilder<P, S>
where P: Freeze, S: Freeze,

§

impl<P, S> RefUnwindSafe for AsyncServiceChainBuilder<P, S>

§

impl<P, S> Send for AsyncServiceChainBuilder<P, S>

§

impl<P, S> Sync for AsyncServiceChainBuilder<P, S>

§

impl<P, S> Unpin for AsyncServiceChainBuilder<P, S>
where P: Unpin, S: Unpin,

§

impl<P, S> UnwindSafe for AsyncServiceChainBuilder<P, S>
where P: UnwindSafe, S: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.