pub trait TemplateLanguage<'a> {
    type Context: 'a;
    type Property: IntoTemplateProperty<'a, Self::Context>;

    // Required methods
    fn wrap_string(
        &self,
        property: impl TemplateProperty<Self::Context, Output = String> + 'a
    ) -> Self::Property;
    fn wrap_string_list(
        &self,
        property: impl TemplateProperty<Self::Context, Output = Vec<String>> + 'a
    ) -> Self::Property;
    fn wrap_boolean(
        &self,
        property: impl TemplateProperty<Self::Context, Output = bool> + 'a
    ) -> Self::Property;
    fn wrap_integer(
        &self,
        property: impl TemplateProperty<Self::Context, Output = i64> + 'a
    ) -> Self::Property;
    fn wrap_signature(
        &self,
        property: impl TemplateProperty<Self::Context, Output = Signature> + 'a
    ) -> Self::Property;
    fn wrap_timestamp(
        &self,
        property: impl TemplateProperty<Self::Context, Output = Timestamp> + 'a
    ) -> Self::Property;
    fn wrap_timestamp_range(
        &self,
        property: impl TemplateProperty<Self::Context, Output = TimestampRange> + 'a
    ) -> Self::Property;
    fn wrap_template(
        &self,
        template: Box<dyn Template<Self::Context> + 'a>
    ) -> Self::Property;
    fn wrap_list_template(
        &self,
        template: Box<dyn ListTemplate<Self::Context> + 'a>
    ) -> Self::Property;
    fn build_keyword(
        &self,
        name: &str,
        span: Span<'_>
    ) -> TemplateParseResult<Self::Property>;
    fn build_method(
        &self,
        build_ctx: &BuildContext<'_, Self::Property>,
        property: Self::Property,
        function: &FunctionCallNode<'_>
    ) -> TemplateParseResult<Self::Property>;
}
Expand description

Callbacks to build language-specific evaluation objects from AST nodes.

Required Associated Types§

Required Methods§

source

fn wrap_string( &self, property: impl TemplateProperty<Self::Context, Output = String> + 'a ) -> Self::Property

source

fn wrap_string_list( &self, property: impl TemplateProperty<Self::Context, Output = Vec<String>> + 'a ) -> Self::Property

source

fn wrap_boolean( &self, property: impl TemplateProperty<Self::Context, Output = bool> + 'a ) -> Self::Property

source

fn wrap_integer( &self, property: impl TemplateProperty<Self::Context, Output = i64> + 'a ) -> Self::Property

source

fn wrap_signature( &self, property: impl TemplateProperty<Self::Context, Output = Signature> + 'a ) -> Self::Property

source

fn wrap_timestamp( &self, property: impl TemplateProperty<Self::Context, Output = Timestamp> + 'a ) -> Self::Property

source

fn wrap_timestamp_range( &self, property: impl TemplateProperty<Self::Context, Output = TimestampRange> + 'a ) -> Self::Property

source

fn wrap_template( &self, template: Box<dyn Template<Self::Context> + 'a> ) -> Self::Property

source

fn wrap_list_template( &self, template: Box<dyn ListTemplate<Self::Context> + 'a> ) -> Self::Property

source

fn build_keyword( &self, name: &str, span: Span<'_> ) -> TemplateParseResult<Self::Property>

source

fn build_method( &self, build_ctx: &BuildContext<'_, Self::Property>, property: Self::Property, function: &FunctionCallNode<'_> ) -> TemplateParseResult<Self::Property>

Object Safety§

This trait is not object safe.

Implementors§