Trait jj_cli::template_builder::TemplateLanguage

source ·
pub trait TemplateLanguage<'a> {
    type Property: IntoTemplateProperty<'a>;

Show 13 methods // Required methods fn wrap_string( property: impl TemplateProperty<Output = String> + 'a, ) -> Self::Property; fn wrap_string_list( property: impl TemplateProperty<Output = Vec<String>> + 'a, ) -> Self::Property; fn wrap_boolean( property: impl TemplateProperty<Output = bool> + 'a, ) -> Self::Property; fn wrap_integer( property: impl TemplateProperty<Output = i64> + 'a, ) -> Self::Property; fn wrap_integer_opt( property: impl TemplateProperty<Output = Option<i64>> + 'a, ) -> Self::Property; fn wrap_signature( property: impl TemplateProperty<Output = Signature> + 'a, ) -> Self::Property; fn wrap_size_hint( property: impl TemplateProperty<Output = SizeHint> + 'a, ) -> Self::Property; fn wrap_timestamp( property: impl TemplateProperty<Output = Timestamp> + 'a, ) -> Self::Property; fn wrap_timestamp_range( property: impl TemplateProperty<Output = TimestampRange> + 'a, ) -> Self::Property; fn wrap_template(template: Box<dyn Template + 'a>) -> Self::Property; fn wrap_list_template( template: Box<dyn ListTemplate + 'a>, ) -> Self::Property; fn build_function( &self, build_ctx: &BuildContext<'_, Self::Property>, function: &FunctionCallNode<'_>, ) -> 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( property: impl TemplateProperty<Output = String> + 'a, ) -> Self::Property

source

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

source

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

source

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

source

fn wrap_integer_opt( property: impl TemplateProperty<Output = Option<i64>> + 'a, ) -> Self::Property

source

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

source

fn wrap_size_hint( property: impl TemplateProperty<Output = SizeHint> + 'a, ) -> Self::Property

source

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

source

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

source

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

source

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

source

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

Translates the given global function call to a property.

This should be delegated to CoreTemplateBuildFnTable::build_function().

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§