pub struct WorkspaceCommandEnvironment { /* private fields */ }
Expand description
Metadata and configuration loaded for a specific workspace.
Implementations§
Source§impl WorkspaceCommandEnvironment
impl WorkspaceCommandEnvironment
pub fn workspace_name(&self) -> &WorkspaceName
Sourcepub fn new_id_prefix_context(&self) -> IdPrefixContext
pub fn new_id_prefix_context(&self) -> IdPrefixContext
Creates fresh new context which manages cache of short commit/change ID prefixes. New context should be created per repo view (or operation.)
Sourcepub fn immutable_expression(&self) -> Rc<UserRevsetExpression>
pub fn immutable_expression(&self) -> Rc<UserRevsetExpression>
User-configured expression defining the immutable set.
Sourcepub fn immutable_heads_expression(&self) -> &Rc<UserRevsetExpression>
pub fn immutable_heads_expression(&self) -> &Rc<UserRevsetExpression>
User-configured expression defining the heads of the immutable set.
Sourcepub fn conflict_marker_style(&self) -> ConflictMarkerStyle
pub fn conflict_marker_style(&self) -> ConflictMarkerStyle
User-configured conflict marker style for materializing conflicts
pub fn template_aliases_map(&self) -> &TemplateAliasesMap
Sourcepub fn parse_template<'a, C, L>(
&self,
ui: &Ui,
language: &L,
template_text: &str,
) -> Result<TemplateRenderer<'a, C>, CommandError>
pub fn parse_template<'a, C, L>( &self, ui: &Ui, language: &L, template_text: &str, ) -> Result<TemplateRenderer<'a, C>, CommandError>
Parses template of the given language into evaluation tree.
Sourcepub fn commit_template_language<'a>(
&'a self,
repo: &'a dyn Repo,
id_prefix_context: &'a IdPrefixContext,
) -> CommitTemplateLanguage<'a>
pub fn commit_template_language<'a>( &'a self, repo: &'a dyn Repo, id_prefix_context: &'a IdPrefixContext, ) -> CommitTemplateLanguage<'a>
Creates commit template language environment for this workspace and the
given repo
.
pub fn operation_template_extensions( &self, ) -> &[Arc<dyn OperationTemplateLanguageExtension>]
Auto Trait Implementations§
impl Freeze for WorkspaceCommandEnvironment
impl !RefUnwindSafe for WorkspaceCommandEnvironment
impl !Send for WorkspaceCommandEnvironment
impl !Sync for WorkspaceCommandEnvironment
impl Unpin for WorkspaceCommandEnvironment
impl !UnwindSafe for WorkspaceCommandEnvironment
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