[−][src]Struct git_commitgraph::file::File
A single commit-graph file.
All operations on a File
are local to that graph file. Since a commit graph can span multiple
files, all interesting graph operations belong on Graph
.
Implementations
impl File
[src][−]
Access
pub fn commit_at(&self, pos: Position) -> Commit<'_>
[src][−]
Returns the commit data for the commit located at the given lexigraphical position.
pos
must range from 0 to self.num_commits().
Panics
Panics if pos
is out of bounds.
pub fn hash_kind(&self) -> HashKind
[src]
pub fn id_at(&self, pos: Position) -> Id<'_>
[src][−]
Returns 20 bytes sha1 at the given index in our list of (sorted) sha1 hashes. The position ranges from 0 to self.num_commits()
pub fn iter_base_graph_ids(&self) -> impl Iterator<Item = Id<'_>>
[src]
pub fn iter_commits(&self) -> impl Iterator<Item = Commit<'_>>
[src]
pub fn iter_ids(&self) -> impl Iterator<Item = Id<'_>>
[src]
pub fn lookup(&self, id: Id<'_>) -> Option<Position>
[src]
pub fn num_commits(&self) -> u32
[src][−]
Returns the number of commits in this graph file.
The maximum valid file::Position
that can be used with this file is one less than
num_commits()
.
pub fn path(&self) -> &Path
[src]
impl File
[src][−]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for File
impl Send for File
impl Sync for File
impl Unpin for File
impl UnwindSafe for File
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,