Trait ComputerRef

Source
pub trait ComputerRef<Context, Code, Input>: IsProviderFor<ComputerRefComponent, Context, (Code, Input)> {
    type Output;

    // Required method
    fn compute_ref(
        context: &Context,
        _code: PhantomData<Code>,
        input: &Input,
    ) -> Self::Output;
}

Required Associated Types§

Required Methods§

Source

fn compute_ref( context: &Context, _code: PhantomData<Code>, input: &Input, ) -> 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> ComputerRef<Context, Code, Input> for UseContext
where Context: CanComputeRef<Code, Input>,

Source§

type Output = <Context as CanComputeRef<Code, Input>>::Output

Source§

fn compute_ref( context: &Context, _code: PhantomData<Code>, input: &Input, ) -> Self::Output

Source§

impl<Context, Code, Input, __Components__, __Delegate__> ComputerRef<Context, Code, Input> for UseDelegate<__Components__>
where __Components__: DelegateComponent<Code, Delegate = __Delegate__>, __Delegate__: ComputerRef<Context, Code, Input>,

Source§

type Output = <__Delegate__ as ComputerRef<Context, Code, Input>>::Output

Source§

fn compute_ref( context: &Context, _code: PhantomData<Code>, input: &Input, ) -> Self::Output

Implementors§

Source§

impl<Component, Context, Code, Input> ComputerRef<Context, Code, Input> for Component
where Component: DelegateComponent<ComputerRefComponent> + IsProviderFor<ComputerRefComponent, Context, (Code, Input)>, Component::Delegate: ComputerRef<Context, Code, Input>,

Source§

type Output = <<Component as DelegateComponent<ComputerRefComponent>>::Delegate as ComputerRef<Context, Code, Input>>::Output

Source§

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

Source§

type Output = Output

Source§

impl<Context, Code, Input, __Components__, __Delegate__> ComputerRef<Context, Code, Input> for UseInputDelegate<__Components__>
where __Components__: DelegateComponent<Input, Delegate = __Delegate__>, __Delegate__: ComputerRef<Context, Code, Input>,

Source§

type Output = <__Delegate__ as ComputerRef<Context, Code, Input>>::Output