Skip to main content

AnyTemplateProperty

Trait AnyTemplateProperty 

Source
pub trait AnyTemplateProperty<'a> {
    // Required methods
    fn try_into_serialize(self: Box<Self>) -> Option<BoxedSerializeProperty<'a>>;
    fn try_into_template(self: Box<Self>) -> Option<Box<dyn Template + 'a>>;
    fn try_join(
        self: Box<Self>,
        separator: Box<dyn Template + 'a>,
    ) -> Option<Box<dyn Template + 'a>>;
}
Expand description

Abstraction trait for a type-erased TemplateProperty

Required Methods§

Source

fn try_into_serialize(self: Box<Self>) -> Option<BoxedSerializeProperty<'a>>

Source

fn try_into_template(self: Box<Self>) -> Option<Box<dyn Template + 'a>>

Source

fn try_join( self: Box<Self>, separator: Box<dyn Template + 'a>, ) -> Option<Box<dyn Template + 'a>>

If this is a list whose elements convert to Template, concatenate with the given separator.

Implementors§

Source§

impl<'a, P> AnyTemplateProperty<'a> for ConditionalProperty<'a, P>
where P: TemplateProperty<Output = bool> + 'a,

Source§

impl<'a, P, O> AnyTemplateProperty<'a> for ListMapProperty<'a, P, O>
where P: TemplateProperty + 'a, P::Output: IntoIterator<Item = O>, O: Clone + 'a,

Source§

impl<'a, P: CoreTemplatePropertyVar<'a>> AnyTemplateProperty<'a> for Expression<P>