Skip to main content

AsyncComputer

Trait AsyncComputer 

Source
pub trait AsyncComputer<__Context__, Code, Input>: IsProviderFor<AsyncComputerComponent, __Context__, (Code, Input)> {
    type Output;

    // Required method
    fn compute_async(
        __context__: &__Context__,
        _code: PhantomData<Code>,
        input: Input,
    ) -> impl Future<Output = Self::Output>;
}

Required Associated Types§

Required Methods§

Source

fn compute_async( __context__: &__Context__, _code: PhantomData<Code>, input: Input, ) -> impl Future<Output = Self::Output>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a, Context, Code, Input, Args, Output, Remainder, Handlers> AsyncComputer<Context, Code, (&'a Input, Args)> for MatchFirstWithHandlersRef<Handlers>
where Input: HasExtractorRef, PipeMonadic<OkMonadic, Handlers>: AsyncComputer<Context, Code, (<Input as HasExtractorRef>::ExtractorRef<'a>, Args), Output = Result<Output, (Remainder, Args)>>, Remainder: FinalizeExtract,

Source§

type Output = Output

Source§

async fn compute_async( context: &Context, code: PhantomData<Code>, __arg2: (&'a Input, Args), ) -> Output

Source§

impl<'a, Context, Code, Input, Args, Output, Remainder, Handlers> AsyncComputer<Context, Code, (&'a mut Input, Args)> for MatchFirstWithHandlersMut<Handlers>
where Input: HasExtractorMut, PipeMonadic<OkMonadic, Handlers>: AsyncComputer<Context, Code, (<Input as HasExtractorMut>::ExtractorMut<'a>, Args), Output = Result<Output, (Remainder, Args)>>, Remainder: FinalizeExtract,

Source§

type Output = Output

Source§

async fn compute_async( context: &Context, code: PhantomData<Code>, __arg2: (&'a mut Input, Args), ) -> Output

Source§

impl<'a, Context, Code, Input, Output, Remainder, Handlers> AsyncComputer<Context, Code, &'a Input> for MatchWithHandlersRef<Handlers>
where Input: HasExtractorRef, PipeMonadic<OkMonadic, Handlers>: AsyncComputer<Context, Code, <Input as HasExtractorRef>::ExtractorRef<'a>, Output = Result<Output, Remainder>>, Remainder: FinalizeExtract,

Source§

type Output = Output

Source§

async fn compute_async( context: &Context, code: PhantomData<Code>, input: &'a Input, ) -> Output

Source§

impl<'a, Context, Code, Input, Output, Remainder, Handlers> AsyncComputer<Context, Code, &'a mut Input> for MatchWithHandlersMut<Handlers>
where Input: HasExtractorMut, PipeMonadic<OkMonadic, Handlers>: AsyncComputer<Context, Code, <Input as HasExtractorMut>::ExtractorMut<'a>, Output = Result<Output, Remainder>>, Remainder: FinalizeExtract,

Source§

type Output = Output

Source§

async fn compute_async( context: &Context, code: PhantomData<Code>, input: &'a mut Input, ) -> Output

Source§

impl<Context, Code, Input, Args, Output, Remainder, Handlers> AsyncComputer<Context, Code, (Input, Args)> for MatchFirstWithHandlers<Handlers>
where Input: HasExtractor, PipeMonadic<OkMonadic, Handlers>: AsyncComputer<Context, Code, (<Input as HasExtractor>::Extractor, Args), Output = Result<Output, (Remainder, Args)>>, Remainder: FinalizeExtract,

Source§

type Output = Output

Source§

async fn compute_async( context: &Context, code: PhantomData<Code>, __arg2: (Input, Args), ) -> Output

Source§

impl<Context, Code, Input, Args, Tag, Value, Provider, Output, Remainder> AsyncComputer<Context, Code, (Input, Args)> for ExtractFirstFieldAndHandle<Tag, Provider>
where Input: ExtractField<Tag, Value = Value, Remainder = Remainder>, Provider: AsyncComputer<Context, Code, (ω<Tag, Value>, Args), Output = Output>,

Source§

type Output = Result<Output, (Remainder, Args)>

Source§

async fn compute_async( context: &Context, tag: PhantomData<Code>, __arg2: (Input, Args), ) -> Result<Output, (Remainder, Args)>

Source§

impl<Context, Code, Input, Output, Remainder, Handlers> AsyncComputer<Context, Code, Input> for MatchWithHandlers<Handlers>
where Input: HasExtractor, PipeMonadic<OkMonadic, Handlers>: AsyncComputer<Context, Code, <Input as HasExtractor>::Extractor, Output = Result<Output, Remainder>>, Remainder: FinalizeExtract,

Source§

type Output = Output

Source§

async fn compute_async( context: &Context, code: PhantomData<Code>, input: Input, ) -> Output

Source§

impl<Context, Code, Input, Provider, Inner, Output, Remainder> AsyncComputer<Context, Code, Input> for DowncastAndHandle<Inner, Provider>
where Input: CanDowncastFields<Inner, Remainder = Remainder>, Provider: AsyncComputer<Context, Code, Inner, Output = Output>,

Source§

type Output = Result<Output, Remainder>

Source§

async fn compute_async( context: &Context, tag: PhantomData<Code>, input: Input, ) -> Result<Output, Remainder>

Source§

impl<Context, Code, Input, Tag, Output> AsyncComputer<Context, Code, Input> for UseField<Tag>
where Context: HasField<Tag>, <Context as HasField<Tag>>::Value: CanComputeAsync<Code, Input, Output = Output>,

Source§

type Output = Output

Source§

async fn compute_async( context: &Context, code: PhantomData<Code>, input: Input, ) -> Output

Source§

impl<Context, Code, Input, Tag, Value, Provider, Output, Remainder> AsyncComputer<Context, Code, Input> for ExtractFieldAndHandle<Tag, Provider>
where Input: ExtractField<Tag, Value = Value, Remainder = Remainder>, Provider: AsyncComputer<Context, Code, ω<Tag, Value>, Output = Output>,

Source§

type Output = Result<Output, Remainder>

Source§

async fn compute_async( context: &Context, tag: PhantomData<Code>, input: Input, ) -> Result<Output, Remainder>

Source§

impl<Context, Code, T1, T2, E, M, Cont> AsyncComputer<Context, Code, Result<T1, E>> for BindErr<M, Cont>
where Cont: AsyncComputer<Context, Code, T1>, M: ContainsValue<<Cont as AsyncComputer<Context, Code, T1>>::Output, Value = Result<T2, E>> + LiftValue<Result<T2, E>, <Cont as AsyncComputer<Context, Code, T1>>::Output>,

Source§

type Output = <M as LiftValue<Result<T2, E>, <Cont as AsyncComputer<Context, Code, T1>>::Output>>::Output

Source§

async fn compute_async( context: &Context, code: PhantomData<Code>, input: Result<T1, E>, ) -> <BindErr<M, Cont> as AsyncComputer<Context, Code, Result<T1, E>>>::Output

Source§

impl<Context, Code, T, E1, E2, M, Cont> AsyncComputer<Context, Code, Result<T, E1>> for BindOk<M, Cont>
where Cont: AsyncComputer<Context, Code, E1>, M: ContainsValue<<Cont as AsyncComputer<Context, Code, E1>>::Output, Value = Result<T, E2>> + LiftValue<Result<T, E2>, <Cont as AsyncComputer<Context, Code, E1>>::Output>,

Source§

type Output = <M as LiftValue<Result<T, E2>, <Cont as AsyncComputer<Context, Code, E1>>::Output>>::Output

Source§

async fn compute_async( context: &Context, code: PhantomData<Code>, input: Result<T, E1>, ) -> <BindOk<M, Cont> as AsyncComputer<Context, Code, Result<T, E1>>>::Output

Source§

impl<Context, Code, Tag, Input, Args, Provider> AsyncComputer<Context, Code, (ω<Tag, Input>, Args)> for HandleFirstFieldValue<Provider>
where Provider: AsyncComputer<Context, Code, (Input, Args)>,

Source§

type Output = <Provider as AsyncComputer<Context, Code, (Input, Args)>>::Output

Source§

async fn compute_async( context: &Context, tag: PhantomData<Code>, __arg2: (ω<Tag, Input>, Args), ) -> <HandleFirstFieldValue<Provider> as AsyncComputer<Context, Code, (ω<Tag, Input>, Args)>>::Output

Source§

impl<Context, Code, Tag, Input, Provider> AsyncComputer<Context, Code, ω<Tag, Input>> for HandleFieldValue<Provider>
where Provider: AsyncComputer<Context, Code, Input>,

Source§

type Output = <Provider as AsyncComputer<Context, Code, Input>>::Output

Source§

async fn compute_async( context: &Context, tag: PhantomData<Code>, input: ω<Tag, Input>, ) -> <HandleFieldValue<Provider> as AsyncComputer<Context, Code, ω<Tag, Input>>>::Output

Source§

impl<__Context__, Code, Input> AsyncComputer<__Context__, Code, Input> for UseContext
where __Context__: CanComputeAsync<Code, Input>,

Source§

type Output = <__Context__ as CanComputeAsync<Code, Input>>::Output

Source§

fn compute_async( __context__: &__Context__, _code: PhantomData<Code>, input: Input, ) -> impl Future<Output = <UseContext as AsyncComputer<__Context__, Code, Input>>::Output>

Source§

impl<__Context__, Code, Input, __Components__, __Delegate__> AsyncComputer<__Context__, Code, Input> for UseDelegate<__Components__>
where __Components__: DelegateComponent<Code, Delegate = __Delegate__>, __Delegate__: AsyncComputer<__Context__, Code, Input>,

Source§

type Output = <__Delegate__ as AsyncComputer<__Context__, Code, Input>>::Output

Source§

fn compute_async( __context__: &__Context__, _code: PhantomData<Code>, input: Input, ) -> impl Future<Output = <UseDelegate<__Components__> as AsyncComputer<__Context__, Code, Input>>::Output>

Implementors§

Source§

impl<Context, Code, Input> AsyncComputer<Context, Code, Input> for ReturnInput

Source§

type Output = Input

Source§

impl<Context, Code, Input, Output, Provider> AsyncComputer<Context, Code, Input> for PromoteAsync<Provider>
where Provider: Computer<Context, Code, Input, Output = Output>,

Source§

type Output = Output

Source§

impl<Context, Code, Input, Provider, Output> AsyncComputer<Context, Code, Input> for TryPromote<Provider>
where Context: HasErrorType, Provider: Handler<Context, Code, Input, Output = Output>,

Source§

type Output = Result<Output, <Context as HasErrorType>::Error>

Source§

impl<Context, Code, Input, ProviderA, ProviderB> AsyncComputer<Context, Code, Input> for ComposeHandlers<ProviderA, ProviderB>
where ProviderA: AsyncComputer<Context, Code, Input>, ProviderB: AsyncComputer<Context, Code, <ProviderA as AsyncComputer<Context, Code, Input>>::Output>,

Source§

type Output = <ProviderB as AsyncComputer<Context, Code, <ProviderA as AsyncComputer<Context, Code, Input>>::Output>>::Output

Source§

impl<Context, Code, Input, Target, Provider> AsyncComputer<Context, Code, Input> for PromoteRef<Provider>
where Provider: AsyncComputerRef<Context, Code, Target>, Input: Deref<Target = Target>,

Source§

type Output = <Provider as AsyncComputerRef<Context, Code, Target>>::Output

Source§

impl<__Component__, __Context__, Code, Input> AsyncComputer<__Context__, Code, Input> for __Component__

Source§

type Output = <<__Component__ as DelegateComponent<AsyncComputerComponent>>::Delegate as AsyncComputer<__Context__, Code, Input>>::Output

Source§

impl<__Context__, Code, Input, __Components__, __Delegate__> AsyncComputer<__Context__, Code, Input> for UseInputDelegate<__Components__>
where __Components__: DelegateComponent<Input, Delegate = __Delegate__>, __Delegate__: AsyncComputer<__Context__, Code, Input>,

Source§

type Output = <__Delegate__ as AsyncComputer<__Context__, Code, Input>>::Output