Struct git_commitgraph::file::File [−][src]
pub struct File { /* fields omitted */ }
Expand description
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
Access
The number of base graphs that this file depends on.
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.
The kind of hash used in this File.
Note that it is always conforming to the hash used in the owning repository.
Returns 20 bytes sha1 at the given index in our list of (sorted) sha1 hashes. The position ranges from 0 to self.num_commits()
Return an iterator over all object hashes stored in the base graph.
return an iterator over all commits in this file.
Return an iterator over all object hashes stored in this file.
Translate the given object hash to its position within this file, if present.
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()
.
Verification
Returns the trailing checksum over the entire content of this file.
Traverse all commits stored in this file and call processor(commit) -> Result<(), Error>
on it.
If the processor
fails, the iteration will be stopped and the entire call results in the respective error.