Crate dag

source ·
Expand description

dag

Building blocks for the commit graph used by source control.

Re-exports

pub use iddag::FirstAncestorConstraint;
pub use iddag::IdDag;
pub use iddag::IdDagAlgorithm;
pub use iddagstore::IdDagStore;
pub use nameset::NameSet;
pub use ops::DagAlgorithm;
pub use segment::IdSegment;
pub use nameset::NameIter as SetIter;
pub use errors::DagError as Error;
pub use nonblocking;

Modules

id
idmap
namedag
nameset
DAG and Id operations (mostly traits)
protocol
segment

Macros

Macro rules to delegate trait implementations

Structs

Base segment.
An integer that separates distinct groups of Ids.
An integer Id representing a node in the graph. Ids are topologically sorted.
Bi-directional mapping between an integer id and a name ([u8]).
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.
State to build a new AbstractNameDag.
These segments can be used directly in the build process of the IdDag. They produced by IdMap::assign_head and IdDag::all_flat_segments.
A linked list tracking a logic “version” with compatibility rules:
A list of VertexNames (usually heads) with options attached to each vertex.
Name of a vertex in the graph.
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 a structure at the given path.

Functions

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

Type Definitions

In-memory version of [NameDag].
A DAG that uses VertexName instead of ids as vertexes.