package irmin

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Build simple slices.

Parameters

module C : Contents.STORE
module N : Node.STORE
module H : Commit.STORE

Signature

Slices

Slices are serializable.

include Tc.S0
type t
val equal : t Tc.equal
val compare : t Tc.compare
val hash : t Tc.hash
val to_json : t Tc.to_json

The REST inteface.

val of_json : t Tc.of_json
val size_of : t Tc.size_of

The serialization format.

val write : t Tc.writer
val read : t Tc.reader
type contents = C.key * C.value

The type for exported contents.

type node = N.key * N.value

The type for exported nodes.

type commit = H.key * H.value

The type for exported commits.

val create : unit -> t Lwt.t

Create a new empty slice.

val add_contents : t -> contents -> unit Lwt.t

add_contents t c adds the contents c to the slice t.

val add_node : t -> node -> unit Lwt.t

add_node t n adds the node n to the slice t.

val add_commit : t -> commit -> unit Lwt.t

add_commit t c adds the commit c to the slice t.

val iter_contents : t -> (contents -> unit Lwt.t) -> unit Lwt.t

iter_contents t f calls f on t's contents.

val iter_nodes : t -> (node -> unit Lwt.t) -> unit Lwt.t

iter_nodes t f calls f on t's nodes.

val iter_commits : t -> (commit -> unit Lwt.t) -> unit Lwt.t

iter_commits t f calls f on t's commits.

OCaml

Innovation. Community. Security.