pub struct OperationTemplateLanguage { /* private fields */ }Implementations§
source§impl OperationTemplateLanguage
impl OperationTemplateLanguage
sourcepub fn new(
root_op_id: &OperationId,
current_op_id: Option<&OperationId>,
extensions: &[impl AsRef<dyn OperationTemplateLanguageExtension>],
) -> Self
pub fn new( root_op_id: &OperationId, current_op_id: Option<&OperationId>, extensions: &[impl AsRef<dyn OperationTemplateLanguageExtension>], ) -> Self
Sets up environment where operation template will be transformed to evaluation tree.
source§impl OperationTemplateLanguage
impl OperationTemplateLanguage
pub fn cache_extension<T: Any>(&self) -> Option<&T>
pub fn wrap_operation( property: impl TemplateProperty<Output = Operation> + 'static, ) -> OperationTemplatePropertyKind
pub fn wrap_operation_id( property: impl TemplateProperty<Output = OperationId> + 'static, ) -> OperationTemplatePropertyKind
Trait Implementations§
source§impl TemplateLanguage<'static> for OperationTemplateLanguage
impl TemplateLanguage<'static> for OperationTemplateLanguage
type Property = OperationTemplatePropertyKind
fn wrap_string( property: impl TemplateProperty<Output = String> + 'static, ) -> Self::Property
fn wrap_string_list( property: impl TemplateProperty<Output = Vec<String>> + 'static, ) -> Self::Property
fn wrap_boolean( property: impl TemplateProperty<Output = bool> + 'static, ) -> Self::Property
fn wrap_integer( property: impl TemplateProperty<Output = i64> + 'static, ) -> Self::Property
fn wrap_integer_opt( property: impl TemplateProperty<Output = Option<i64>> + 'static, ) -> Self::Property
fn wrap_signature( property: impl TemplateProperty<Output = Signature> + 'static, ) -> Self::Property
fn wrap_size_hint( property: impl TemplateProperty<Output = SizeHint> + 'static, ) -> Self::Property
fn wrap_timestamp( property: impl TemplateProperty<Output = Timestamp> + 'static, ) -> Self::Property
fn wrap_timestamp_range( property: impl TemplateProperty<Output = TimestampRange> + 'static, ) -> Self::Property
fn wrap_template(template: Box<dyn Template + 'static>) -> Self::Property
fn wrap_list_template( template: Box<dyn ListTemplate + 'static>, ) -> Self::Property
source§fn build_function(
&self,
build_ctx: &BuildContext<'_, Self::Property>,
function: &FunctionCallNode<'_>,
) -> TemplateParseResult<Self::Property>
fn build_function( &self, build_ctx: &BuildContext<'_, Self::Property>, function: &FunctionCallNode<'_>, ) -> TemplateParseResult<Self::Property>
Translates the given global
function call to a property. Read morefn build_method( &self, build_ctx: &BuildContext<'_, Self::Property>, property: Self::Property, function: &FunctionCallNode<'_>, ) -> TemplateParseResult<Self::Property>
Auto Trait Implementations§
impl Freeze for OperationTemplateLanguage
impl !RefUnwindSafe for OperationTemplateLanguage
impl !Send for OperationTemplateLanguage
impl !Sync for OperationTemplateLanguage
impl Unpin for OperationTemplateLanguage
impl !UnwindSafe for OperationTemplateLanguage
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more