Library
Module
Module type
Parameter
Class
Class type
Tree
provides immutable, in-memory partial mirror of the store, with lazy reads and delayed writes.
Trees are like staging area in Git: they are immutable temporary non-persistent areas (they disappear if the host crash), held in memory for efficiency, where reads are done lazily and writes are done only when needed on commit: if you modify a key twice, only the last change will be written to the store when you commit.
val empty : tree
empty
is the empty tree. The empty tree does not have associated backend configuration values, as they can perform in-memory operation, independently of any given backend.
of_contents c
is the subtree built from the contents c
.
kind t k
is the type of s
in t
. It could either be a tree node or some file contents. It is None
if k
is not present in t
.
list t key
is the list of files and sub-nodes stored under k
in t
.
diff x y
is the difference of contents between x
and y
.
find_all t k
is Some (b, m)
if k
is associated to the contents b
and metadata m
in t
and None
if k
is not present in t
.
find
is similar to find_all
but it discards metadata.
Same as find_all
but raise Invalid_arg
if k
is not present in t
.
add t k c
is the tree where the key k
is bound to the contents c
but is similar to t
for other bindings.
remove t k
is the tree where k
bindings has been removed but is similar to t
for other bindings.
find_tree t k
is Some v
if k
is associated to v
in t
. It is None
if k
is not present in t
.
get_tree t k
is v
if k
is associated to v
in t
. Raise Invalid_arg
if k
is not present in t
.
add_tree t k v
is the tree where the key k
is bound to the tree v
but is similar to t
for other bindings
val merge : tree Irmin.Merge.t
merge
is the 3-way merge function for trees.
The type for concrete trees.
to_concrete t
is the concrete tree equivalent to the subtree t
.
module Hash : Irmin.Hash.S with type t = H.t
Hash
provides base functions for node hashes.
The type for tree hashes.
val hash_t : hash Irmin.Type.t
hash_t
is the representation of the hash
type.