[][src]Struct git_commitgraph::graph::Graph

pub struct Graph { /* fields omitted */ }

A complete commit graph.

The data in the commit graph may come from a monolithic objects/info/commit-graph file, or it may come from one or more objects/info/commit-graphs/graph-*.graph files. These files are generated via git commit-graph write ... commands.

Implementations

impl Graph[src]

Access

pub fn commit_at(&self, pos: Position) -> Commit<'_>[src]

pub fn commit_by_id(&self, id: Id<'_>) -> Option<Commit<'_>>[src]

pub fn id_at(&self, pos: Position) -> Id<'_>[src]

pub fn iter_commits(&self) -> impl Iterator<Item = Commit<'_>>[src]

Iterate over commits in unsorted order.

pub fn iter_ids(&self) -> impl Iterator<Item = Id<'_>>[src]

Iterate over commit IDs in unsorted order.

pub fn lookup(&self, id: Id<'_>) -> Option<Position>[src]

pub fn num_commits(&self) -> u32[src]

impl Graph[src]

Instantiate a Graph from various sources

pub fn at(path: impl AsRef<Path>) -> Result<Self, Error>[src]

pub fn from_commit_graphs_dir(path: impl AsRef<Path>) -> Result<Self, Error>[src]

pub fn from_file(path: impl AsRef<Path>) -> Result<Self, Error>[src]

pub fn from_info_dir(info_dir: impl AsRef<Path>) -> Result<Self, Error>[src]

pub fn new(files: Vec<File>) -> Result<Self, Error>[src]

impl Graph[src]

pub fn verify_integrity<E>(
    &self,
    processor: impl FnMut(&Commit<'_>) -> Result<(), E>
) -> Result<Outcome, Error<E>> where
    E: Error + 'static, 
[src]

Trait Implementations

impl<'_> TryFrom<&'_ Path> for Graph[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> TryConv for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.