Module entity

Module entity 

Source
Expand description

The core trait of git_bug-rs. All values, that we commit to storage are Entities, that is they implement the Entity trait.

This trait implements reading (and in the future writing) the data structure expected by git-bug in the commits, whilst delegating the encoding/decode of operations to the implementer.

Modules§

bfs
find
id
Ids are needed to provide globally consistent references to Entities.
identity
Every Entity needs to be connected to a set of Identities that contributed to it.
lamport
The Lamport timestamp algorithm is a simple logical clock algorithm used to determine the order of events in a distributed computer system. As different nodes or processes will typically not be perfectly synchronized, this algorithm is used to provide a partial ordering of events with minimal overhead, and conceptually provide a starting point for the more advanced vector clock method. The algorithm is named after its creator, Leslie Lamport.
nonce
Handling for the Nonce value used to make each Operation unique.
operation
A generic representation of an operation. This contains the data, that every operation needs to contain (i.e., author, nonce, etc.).
read
Entity read errors.
snapshot
Snapshots are complied versions of Entities, that are easier to consume (i.e., their attributes are fixed.). However, changing or re-committing them to disk is impossible, as they drop all of the information needed to re-construct the correct DAG.
timestamp
Handling of UNIX time stamps.

Traits§

Entity
Entities are the “objects” that compose a Replica.
EntityRead
Extension trait for Entities.