pub trait TemplateProperty<C> {
    type Output;

    // Required method
    fn extract(&self, context: &C) -> Self::Output;
}

Required Associated Types§

Required Methods§

source

fn extract(&self, context: &C) -> Self::Output

Trait Implementations§

source§

impl<'a, C: 'a, O> IntoTemplate<'a, C> for Box<dyn TemplateProperty<C, Output = O> + 'a>
where O: Template<()> + 'a,

source§

fn into_template(self) -> Box<dyn Template<C> + 'a>

Implementations on Foreign Types§

source§

impl<C, P: TemplateProperty<C> + ?Sized> TemplateProperty<C> for Box<P>

§

type Output = <P as TemplateProperty<C>>::Output

source§

fn extract(&self, context: &C) -> Self::Output

source§

impl<C, P: TemplateProperty<C>> TemplateProperty<C> for Option<P>

§

type Output = Option<<P as TemplateProperty<C>>::Output>

source§

fn extract(&self, context: &C) -> Self::Output

source§

impl<C, T0: TemplateProperty<C>> TemplateProperty<C> for (T0,)

§

type Output = (<T0 as TemplateProperty<C>>::Output,)

source§

fn extract(&self, context: &C) -> Self::Output

source§

impl<C, T0: TemplateProperty<C>, T1: TemplateProperty<C>> TemplateProperty<C> for (T0, T1)

§

type Output = (<T0 as TemplateProperty<C>>::Output, <T1 as TemplateProperty<C>>::Output)

source§

fn extract(&self, context: &C) -> Self::Output

source§

impl<C, T0: TemplateProperty<C>, T1: TemplateProperty<C>, T2: TemplateProperty<C>> TemplateProperty<C> for (T0, T1, T2)

§

type Output = (<T0 as TemplateProperty<C>>::Output, <T1 as TemplateProperty<C>>::Output, <T2 as TemplateProperty<C>>::Output)

source§

fn extract(&self, context: &C) -> Self::Output

source§

impl<C, T0: TemplateProperty<C>, T1: TemplateProperty<C>, T2: TemplateProperty<C>, T3: TemplateProperty<C>> TemplateProperty<C> for (T0, T1, T2, T3)

§

type Output = (<T0 as TemplateProperty<C>>::Output, <T1 as TemplateProperty<C>>::Output, <T2 as TemplateProperty<C>>::Output, <T3 as TemplateProperty<C>>::Output)

source§

fn extract(&self, context: &C) -> Self::Output

Implementors§

source§

impl<C, O, F: Fn(&C) -> O> TemplateProperty<C> for TemplatePropertyFn<F>

§

type Output = O

source§

impl<C, O, P, F> TemplateProperty<C> for TemplateFunction<P, F>
where P: TemplateProperty<C>, F: Fn(P::Output) -> O,

§

type Output = O

source§

impl<C, O: Clone> TemplateProperty<C> for Literal<O>

§

type Output = O

source§

impl<C, O: Clone> TemplateProperty<C> for PropertyPlaceholder<O>

§

type Output = O

source§

impl<C, T: Template<C>> TemplateProperty<C> for PlainTextFormattedProperty<T>