##// END OF EJS Templates
rust-revlog: a trait for the revlog index...
Georges Racinet -
r44642:3fb39dc2 default
parent child Browse files
Show More
@@ -40,3 +40,17 b' pub enum GraphError {'
40 ParentOutOfRange(Revision),
40 ParentOutOfRange(Revision),
41 WorkingDirectoryUnsupported,
41 WorkingDirectoryUnsupported,
42 }
42 }
43
44 /// The Mercurial Revlog Index
45 ///
46 /// This is currently limited to the minimal interface that is needed for
47 /// the [`nodemap`](nodemap/index.html) module
48 pub trait RevlogIndex {
49 /// Total number of Revisions referenced in this index
50 fn len(&self) -> usize;
51
52 /// Return a reference to the Node or `None` if rev is out of bounds
53 ///
54 /// `NULL_REVISION` is not considered to be out of bounds.
55 fn node(&self, rev: Revision) -> Option<&Node>;
56 }
General Comments 0
You need to be logged in to leave comments. Login now