Crate dag

Source
Expand description

§dag

Building blocks for the commit graph used by source control.

Re-exports§

pub use dag::Dag;
pub use dag::DagBuilder;
pub use iddag::FirstAncestorConstraint;
pub use iddag::IdDag;
pub use iddag::IdDagAlgorithm;
pub use iddagstore::IdDagStore;
pub use idmap::IdMap;
pub use ops::DagAlgorithm;
pub use segment::IdSegment;
pub use set::Set;
pub use dag::MemDag;
pub use set::NameIter as SetIter;
pub use errors::DagError as Error;
pub use nonblocking;

Modules§

clone
config
dag
dag
default_impl
errors
id
id
iddag
iddagstore
idmap
idmap
ops
DAG and Id operations (mostly traits)
protocol
protocol
render
segment
segment
set
set
tests
utils

Macros§

delegate
Macro rules to delegate trait implementations
failpoint

Structs§

CloneData
FlatSegment
Base segment.
Group
An integer that separates distinct groups of Ids.
Id
An integer Id representing a node in the graph. Ids are topologically sorted.
IdList
Mainly for iteration (skip, take, count, into_iter) handling.
IdSet
A set of integer spans.
Location
The position of one node in the graph relative their known descendant. This structure is relevant when the IdMap is lazy. Assuming that all parents of merges and all heads are known then any node can be represented as their first descendant and the distance to that descendant.
OrderedSpan
Similar to Span but the iteration order is defined by start (inclusive) and end (inclusive), not hardcoded DESC. start might be larger or smaller than end.
PreparedFlatSegments
These segments can be used directly in the build process of the IdDag. They produced by IdMap::assign_head and IdDag::all_flat_segments.
VerLink
A linked list tracking a logic “version” with compatibility rules:
Vertex
Name of a vertex in the graph.
VertexListWithOptions
A list of Vertexs (usually heads) with options attached to each vertex.
VertexOptions
Options attached to a vertex. Usually the vertex is a head. The head and its ancestors are going to be inserted to the graph. The options controls some details about the insertion.

Traits§

Repair
Repair a structure at the given path.

Functions§

describe_indexedlog_entry
Describe bytes of an indexedlog entry. This is only for troubleshooting purpose.

Type Aliases§

IdSetIter
IdSpan
Level
MemIdDag
OnDiskIdDag
Result