Skip to main content

AsyncComputerRef

Trait AsyncComputerRef 

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

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

Required Associated Types§

Required Methods§

Source

fn compute_async_ref( __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> AsyncComputerRef<__Context__, Code, Input> for UseContext
where __Context__: CanComputeAsyncRef<Code, Input>,

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Implementors§

Source§

impl<Context, Code, Input, Provider, Output> AsyncComputerRef<Context, Code, Input> for PromoteRef<Provider>
where Provider: for<'a> AsyncComputer<Context, Code, &'a Input, Output = Output>,

Source§

type Output = Output

Source§

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

Source§

type Output = <<__Component__ as DelegateComponent<AsyncComputerRefComponent>>::Delegate as AsyncComputerRef<__Context__, Code, Input>>::Output

Source§

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

Source§

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