pub trait Revset: Debug {
// Required methods
fn iter(&self) -> Box<dyn Iterator<Item = CommitId> + '_>;
fn commit_change_ids(
&self
) -> Box<dyn Iterator<Item = (CommitId, ChangeId)> + '_>;
fn iter_graph(
&self
) -> Box<dyn Iterator<Item = (CommitId, Vec<RevsetGraphEdge>)> + '_>;
fn is_empty(&self) -> bool;
fn count_estimate(&self) -> (usize, Option<usize>);
}
Required Methods§
sourcefn iter(&self) -> Box<dyn Iterator<Item = CommitId> + '_>
fn iter(&self) -> Box<dyn Iterator<Item = CommitId> + '_>
Iterate in topological order with children before parents.
sourcefn commit_change_ids(
&self
) -> Box<dyn Iterator<Item = (CommitId, ChangeId)> + '_>
fn commit_change_ids( &self ) -> Box<dyn Iterator<Item = (CommitId, ChangeId)> + '_>
Iterates commit/change id pairs in topological order.
fn iter_graph( &self ) -> Box<dyn Iterator<Item = (CommitId, Vec<RevsetGraphEdge>)> + '_>
fn is_empty(&self) -> bool
sourcefn count_estimate(&self) -> (usize, Option<usize>)
fn count_estimate(&self) -> (usize, Option<usize>)
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.