pub trait Revset: Debug {
// Required methods
fn stream<'a>(
&self,
) -> LocalBoxStream<'a, Result<CommitId, RevsetEvaluationError>>
where Self: 'a;
fn commit_change_ids<'a>(
&self,
) -> Box<dyn Iterator<Item = Result<(CommitId, ChangeId), RevsetEvaluationError>> + 'a>
where Self: 'a;
fn stream_graph<'a>(
&self,
) -> LocalBoxStream<'a, Result<GraphNode<CommitId>, RevsetEvaluationError>>
where Self: 'a;
fn is_empty(&self) -> bool;
fn count_estimate(
&self,
) -> Result<(usize, Option<usize>), RevsetEvaluationError>;
fn containing_fn<'a>(&self) -> Box<RevsetContainingFn<'a>>
where Self: 'a;
}Required Methods§
Sourcefn stream<'a>(
&self,
) -> LocalBoxStream<'a, Result<CommitId, RevsetEvaluationError>>where
Self: 'a,
fn stream<'a>(
&self,
) -> LocalBoxStream<'a, Result<CommitId, RevsetEvaluationError>>where
Self: 'a,
Streams in topological order with children before parents.
Sourcefn commit_change_ids<'a>(
&self,
) -> Box<dyn Iterator<Item = Result<(CommitId, ChangeId), RevsetEvaluationError>> + 'a>where
Self: 'a,
fn commit_change_ids<'a>(
&self,
) -> Box<dyn Iterator<Item = Result<(CommitId, ChangeId), RevsetEvaluationError>> + 'a>where
Self: 'a,
Iterates commit/change id pairs in topological order.
Sourcefn stream_graph<'a>(
&self,
) -> LocalBoxStream<'a, Result<GraphNode<CommitId>, RevsetEvaluationError>>where
Self: 'a,
fn stream_graph<'a>(
&self,
) -> LocalBoxStream<'a, Result<GraphNode<CommitId>, RevsetEvaluationError>>where
Self: 'a,
Streams graphs nodes (commit ID and edges) in topological order with children before parents.
Sourcefn count_estimate(
&self,
) -> Result<(usize, Option<usize>), RevsetEvaluationError>
fn count_estimate( &self, ) -> Result<(usize, Option<usize>), RevsetEvaluationError>
Inclusive lower bound and, optionally, inclusive upper bound of how many commits are in the revset. The implementation can use its discretion as to how much effort should be put into the estimation, and how accurate the resulting estimate should be.
Sourcefn containing_fn<'a>(&self) -> Box<RevsetContainingFn<'a>>where
Self: 'a,
fn containing_fn<'a>(&self) -> Box<RevsetContainingFn<'a>>where
Self: 'a,
Returns a closure that checks if a commit is contained within the revset.
The implementation may construct and maintain any necessary internal context to optimize the performance of the check.