pub struct RevsetExpressionEvaluator<'repo> { /* private fields */ }Expand description
Wrapper around UserRevsetExpression 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: Arc<UserRevsetExpression>, ) -> Self
Sourcepub fn expression(&self) -> &Arc<UserRevsetExpression>
pub fn expression(&self) -> &Arc<UserRevsetExpression>
Returns the underlying expression.
Sourcepub fn intersect_with(&mut self, other: &Arc<UserRevsetExpression>)
pub fn intersect_with(&mut self, other: &Arc<UserRevsetExpression>)
Intersects the underlying expression with the other expression.
Sourcepub fn resolve(
&self,
) -> Result<Arc<ResolvedRevsetExpression>, RevsetResolutionError>
pub fn resolve( &self, ) -> Result<Arc<ResolvedRevsetExpression>, RevsetResolutionError>
Resolves user symbols in the expression, returns new 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 = Result<CommitId, RevsetEvaluationError>> + 'repo>, UserRevsetEvaluationError>
pub fn evaluate_to_commit_ids( &self, ) -> Result<Box<dyn Iterator<Item = Result<CommitId, RevsetEvaluationError>> + '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 = Result<Commit, RevsetEvaluationError>> + use<'repo>, UserRevsetEvaluationError>
pub fn evaluate_to_commits( &self, ) -> Result<impl Iterator<Item = Result<Commit, RevsetEvaluationError>> + use<'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