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> 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<__Component__, __Context__, Code> Producer<__Context__, Code> for __Component__
where __Component__: DelegateComponent<ProducerComponent> + IsProviderFor<ProducerComponent, __Context__, Code>, __Component__::Delegate: Producer<__Context__, Code>,

Source§

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