pub struct CloningForkService<S1, S2> { /* private fields */ }Expand description
A Service, MutService, or AsyncService that encapsulates two service and accepts a Cloneable input, which is passed to both underlying services, returning their outputs as a tuple.
Implementations§
Source§impl<S1, S2> CloningForkService<S1, S2>
impl<S1, S2> CloningForkService<S1, S2>
Trait Implementations§
Source§impl<S1: AsyncService, S2: AsyncService<Input = S1::Input, Error = S1::Error>> AsyncService for CloningForkService<S1, S2>
impl<S1: AsyncService, S2: AsyncService<Input = S1::Input, Error = S1::Error>> AsyncService for CloningForkService<S1, S2>
type Input = <S1 as AsyncService>::Input
type Output = (<S1 as AsyncService>::Output, <S2 as AsyncService>::Output)
type Error = <S1 as AsyncService>::Error
fn process<'life0, 'async_trait>(
&'life0 self,
input: Self::Input,
) -> Pin<Box<dyn Future<Output = Result<Self::Output, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl<S1: MutService, S2: MutService<Input = S1::Input, Error = S1::Error>> MutService for CloningForkService<S1, S2>
impl<S1: MutService, S2: MutService<Input = S1::Input, Error = S1::Error>> MutService for CloningForkService<S1, S2>
type Input = <S1 as MutService>::Input
type Output = (<S1 as MutService>::Output, <S2 as MutService>::Output)
type Error = <S1 as MutService>::Error
fn process(&mut self, input: Self::Input) -> Result<Self::Output, Self::Error>
Source§fn into_dyn<'a>(
self,
) -> DynMutService<'a, Self::Input, Self::Output, Self::Error>where
Self: Sized + 'static,
fn into_dyn<'a>(
self,
) -> DynMutService<'a, Self::Input, Self::Output, Self::Error>where
Self: Sized + 'static,
Convert this
Service into a DynMutServiceSource§impl<S1: Service, S2: Service<Input = S1::Input, Error = S1::Error>> Service for CloningForkService<S1, S2>
impl<S1: Service, S2: Service<Input = S1::Input, Error = S1::Error>> Service for CloningForkService<S1, S2>
type Input = <S1 as Service>::Input
type Output = (<S1 as Service>::Output, <S2 as Service>::Output)
type Error = <S1 as Service>::Error
Source§fn process(&self, input: Self::Input) -> Result<Self::Output, Self::Error>
fn process(&self, input: Self::Input) -> Result<Self::Output, Self::Error>
Process an input, producing a
Result<Self::Output, Self::Error>Source§fn into_mut(self) -> ServiceMut<Self>where
Self: Sized,
fn into_mut(self) -> ServiceMut<Self>where
Self: Sized,
Source§fn into_async(self) -> ServiceAsync<Self>
fn into_async(self) -> ServiceAsync<Self>
Source§fn into_dyn<'a>(self) -> DynService<'a, Self::Input, Self::Output, Self::Error>where
Self: Sized + 'static,
fn into_dyn<'a>(self) -> DynService<'a, Self::Input, Self::Output, Self::Error>where
Self: Sized + 'static,
Convert this
Service into a DynServiceAuto Trait Implementations§
impl<S1, S2> Freeze for CloningForkService<S1, S2>
impl<S1, S2> RefUnwindSafe for CloningForkService<S1, S2>where
S1: RefUnwindSafe,
S2: RefUnwindSafe,
impl<S1, S2> Send for CloningForkService<S1, S2>
impl<S1, S2> Sync for CloningForkService<S1, S2>
impl<S1, S2> Unpin for CloningForkService<S1, S2>
impl<S1, S2> UnwindSafe for CloningForkService<S1, S2>where
S1: UnwindSafe,
S2: 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