Skip to main content

Producer

Trait Producer 

Source
pub trait Producer<__Context__, Code>: IsProviderFor<ProducerComponent, __Context__, Code> {
    type Output;

    // Required method
    fn produce(
        __context__: &__Context__,
        _code: PhantomData<Code>,
    ) -> Self::Output;
}

Required Associated Types§

Required Methods§

Source

fn produce(__context__: &__Context__, _code: PhantomData<Code>) -> Self::Output

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

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

Source§

type Output = <__Delegate__ as Producer<__Context__, Code>>::Output

Source§

fn produce(__context__: &__Context__, _code: PhantomData<Code>) -> Self::Output

Source§

impl<__Context__, Code, __Components__, __Path__> Producer<__Context__, Code> for RedirectLookup<__Components__, __Path__>
where __Path__: ConcatPath<PathCons<Code, Nil>>, __Components__: DelegateComponent<<__Path__ as ConcatPath<PathCons<Code, Nil>>>::Output>, <__Components__ as DelegateComponent<<__Path__ as ConcatPath<PathCons<Code, Nil>>>::Output>>::Delegate: Producer<__Context__, Code>,

Source§

type Output = <<__Components__ as DelegateComponent<<__Path__ as ConcatPath<PathCons<Code, Nil>>>::Output>>::Delegate as Producer<__Context__, Code>>::Output

Source§

fn produce(__context__: &__Context__, _code: PhantomData<Code>) -> Self::Output

Source§

impl<__Context__, Code> Producer<__Context__, Code> for UseContext
where __Context__: CanProduce<Code>,

Source§

type Output = <__Context__ as CanProduce<Code>>::Output

Source§

fn produce(__context__: &__Context__, _code: PhantomData<Code>) -> Self::Output

Implementors§

Source§

impl<__Provider__, __Context__, Code> Producer<__Context__, Code> for __Provider__
where __Provider__: DelegateComponent<ProducerComponent> + IsProviderFor<ProducerComponent, __Context__, Code>, <__Provider__ as DelegateComponent<ProducerComponent>>::Delegate: Producer<__Context__, Code>,

Source§

type Output = <<__Provider__ as DelegateComponent<ProducerComponent>>::Delegate as Producer<__Context__, Code>>::Output