pub struct OperationTemplateLanguage { /* private fields */ }
Expand description
Template environment for jj op log
.
Implementations§
Source§impl OperationTemplateLanguage
impl OperationTemplateLanguage
Sourcepub fn new(
repo_loader: &RepoLoader,
current_op_id: Option<&OperationId>,
extensions: &[impl AsRef<dyn OperationTemplateLanguageExtension>],
) -> Self
pub fn new( repo_loader: &RepoLoader, 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>
Trait Implementations§
Source§impl OperationTemplateEnvironment for OperationTemplateLanguage
impl OperationTemplateEnvironment for OperationTemplateLanguage
fn repo_loader(&self) -> &RepoLoader
fn current_op_id(&self) -> Option<&OperationId>
Source§impl TemplateLanguage<'static> for OperationTemplateLanguage
impl TemplateLanguage<'static> for OperationTemplateLanguage
type Property = OperationTemplateLanguagePropertyKind
fn settings(&self) -> &UserSettings
Source§fn build_function(
&self,
diagnostics: &mut TemplateDiagnostics,
build_ctx: &BuildContext<'_, Self::Property>,
function: &FunctionCallNode<'_>,
) -> TemplateParseResult<Self::Property>
fn build_function( &self, diagnostics: &mut TemplateDiagnostics, build_ctx: &BuildContext<'_, Self::Property>, function: &FunctionCallNode<'_>, ) -> TemplateParseResult<Self::Property>
Translates the given global
function
call to a property. Read moreSource§fn build_method(
&self,
diagnostics: &mut TemplateDiagnostics,
build_ctx: &BuildContext<'_, Self::Property>,
property: Self::Property,
function: &FunctionCallNode<'_>,
) -> TemplateParseResult<Self::Property>
fn build_method( &self, diagnostics: &mut TemplateDiagnostics, build_ctx: &BuildContext<'_, Self::Property>, property: Self::Property, function: &FunctionCallNode<'_>, ) -> TemplateParseResult<Self::Property>
Creates a method call thunk for the given
function
of the given
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