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<Context, Code, Input, Tag, Output> AsyncComputer<Context, Code, Input> for UseField<Tag>
where Context: HasField<Tag>, Context::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> 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 = Self::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 = Self::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::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__
where __Component__: DelegateComponent<AsyncComputerComponent> + IsProviderFor<AsyncComputerComponent, __Context__, (Code, Input)>, __Component__::Delegate: AsyncComputer<__Context__, Code, Input>,

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