CoreTemplatePropertyVar

Trait CoreTemplatePropertyVar 

Source
pub trait CoreTemplatePropertyVar<'a>{
    // Required methods
    fn wrap_template(template: Box<dyn Template + 'a>) -> Self;
    fn wrap_list_template(template: Box<dyn ListTemplate + 'a>) -> Self;
    fn type_name(&self) -> &'static str;
    fn try_into_boolean(self) -> Option<BoxedTemplateProperty<'a, bool>>;
    fn try_into_integer(self) -> Option<BoxedTemplateProperty<'a, i64>>;
    fn try_into_stringify(self) -> Option<BoxedTemplateProperty<'a, String>>;
    fn try_into_serialize(self) -> Option<BoxedSerializeProperty<'a>>;
    fn try_into_template(self) -> Option<Box<dyn Template + 'a>>;
    fn try_into_eq(self, other: Self) -> Option<BoxedTemplateProperty<'a, bool>>;
    fn try_into_cmp(
        self,
        other: Self,
    ) -> Option<BoxedTemplateProperty<'a, Ordering>>;
}
Expand description

Wrapper for the core template property types.

Required Methods§

Source

fn wrap_template(template: Box<dyn Template + 'a>) -> Self

Source

fn wrap_list_template(template: Box<dyn ListTemplate + 'a>) -> Self

Source

fn type_name(&self) -> &'static str

Type name of the property output.

Source

fn try_into_boolean(self) -> Option<BoxedTemplateProperty<'a, bool>>

Source

fn try_into_integer(self) -> Option<BoxedTemplateProperty<'a, i64>>

Source

fn try_into_stringify(self) -> Option<BoxedTemplateProperty<'a, String>>

Transforms into a string property by formatting the value if needed.

Source

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

Source

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

Source

fn try_into_eq(self, other: Self) -> Option<BoxedTemplateProperty<'a, bool>>

Transforms into a property that will evaluate to self == other.

Source

fn try_into_cmp( self, other: Self, ) -> Option<BoxedTemplateProperty<'a, Ordering>>

Transforms into a property that will evaluate to an Ordering.

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.

Implementors§