pub struct CommitTemplateLanguage<'repo> { /* private fields */ }
Implementations§
Source§impl<'repo> CommitTemplateLanguage<'repo>
impl<'repo> CommitTemplateLanguage<'repo>
Sourcepub fn new(
repo: &'repo dyn Repo,
path_converter: &'repo RepoPathUiConverter,
workspace_name: &WorkspaceName,
revset_parse_context: RevsetParseContext<'repo>,
id_prefix_context: &'repo IdPrefixContext,
immutable_expression: Rc<UserRevsetExpression>,
conflict_marker_style: ConflictMarkerStyle,
extensions: &[impl AsRef<dyn CommitTemplateLanguageExtension>],
) -> Self
pub fn new( repo: &'repo dyn Repo, path_converter: &'repo RepoPathUiConverter, workspace_name: &WorkspaceName, revset_parse_context: RevsetParseContext<'repo>, id_prefix_context: &'repo IdPrefixContext, immutable_expression: Rc<UserRevsetExpression>, conflict_marker_style: ConflictMarkerStyle, extensions: &[impl AsRef<dyn CommitTemplateLanguageExtension>], ) -> Self
Sets up environment where commit template will be transformed to evaluation tree.
Source§impl<'repo> CommitTemplateLanguage<'repo>
impl<'repo> CommitTemplateLanguage<'repo>
pub fn repo(&self) -> &'repo dyn Repo
pub fn workspace_name(&self) -> &WorkspaceName
pub fn keyword_cache(&self) -> &CommitKeywordCache<'repo>
pub fn cache_extension<T: Any>(&self) -> Option<&T>
Trait Implementations§
Source§impl<'repo> TemplateLanguage<'repo> for CommitTemplateLanguage<'repo>
impl<'repo> TemplateLanguage<'repo> for CommitTemplateLanguage<'repo>
type Property = CommitTemplatePropertyKind<'repo>
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 morefn build_method( &self, diagnostics: &mut TemplateDiagnostics, build_ctx: &BuildContext<'_, Self::Property>, property: Self::Property, function: &FunctionCallNode<'_>, ) -> TemplateParseResult<Self::Property>
Auto Trait Implementations§
impl<'repo> !Freeze for CommitTemplateLanguage<'repo>
impl<'repo> !RefUnwindSafe for CommitTemplateLanguage<'repo>
impl<'repo> !Send for CommitTemplateLanguage<'repo>
impl<'repo> !Sync for CommitTemplateLanguage<'repo>
impl<'repo> Unpin for CommitTemplateLanguage<'repo>
impl<'repo> !UnwindSafe for CommitTemplateLanguage<'repo>
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