Struct jj_cli::revset_util::RevsetExpressionEvaluator
source · pub struct RevsetExpressionEvaluator<'repo> { /* private fields */ }Expand description
Wrapper around RevsetExpression to provide convenient methods.
Implementations§
source§impl<'repo> RevsetExpressionEvaluator<'repo>
impl<'repo> RevsetExpressionEvaluator<'repo>
pub fn new( repo: &'repo dyn Repo, extensions: Arc<RevsetExtensions>, id_prefix_context: &'repo IdPrefixContext, expression: Rc<RevsetExpression>, ) -> Self
sourcepub fn expression(&self) -> &Rc<RevsetExpression>
pub fn expression(&self) -> &Rc<RevsetExpression>
Returns the underlying expression.
sourcepub fn intersect_with(&mut self, other: &Rc<RevsetExpression>)
pub fn intersect_with(&mut self, other: &Rc<RevsetExpression>)
Intersects the underlying expression with the other expression.
sourcepub fn evaluate(
&self,
) -> Result<Box<dyn Revset + 'repo>, UserRevsetEvaluationError>
pub fn evaluate( &self, ) -> Result<Box<dyn Revset + 'repo>, UserRevsetEvaluationError>
Evaluates the expression.
sourcepub fn evaluate_to_commit_ids(
&self,
) -> Result<Box<dyn Iterator<Item = CommitId> + 'repo>, UserRevsetEvaluationError>
pub fn evaluate_to_commit_ids( &self, ) -> Result<Box<dyn Iterator<Item = CommitId> + 'repo>, UserRevsetEvaluationError>
Evaluates the expression to an iterator over commit ids. Entries are sorted in reverse topological order.
sourcepub fn evaluate_to_commits(
&self,
) -> Result<impl Iterator<Item = BackendResult<Commit>> + 'repo, UserRevsetEvaluationError>
pub fn evaluate_to_commits( &self, ) -> Result<impl Iterator<Item = BackendResult<Commit>> + 'repo, UserRevsetEvaluationError>
Evaluates the expression to an iterator over commit objects. Entries are sorted in reverse topological order.
Auto Trait Implementations§
impl<'repo> Freeze for RevsetExpressionEvaluator<'repo>
impl<'repo> !RefUnwindSafe for RevsetExpressionEvaluator<'repo>
impl<'repo> !Send for RevsetExpressionEvaluator<'repo>
impl<'repo> !Sync for RevsetExpressionEvaluator<'repo>
impl<'repo> Unpin for RevsetExpressionEvaluator<'repo>
impl<'repo> !UnwindSafe for RevsetExpressionEvaluator<'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