Module Proof.Env

Parameters

Signature

type mode =
  1. | Produce
  2. | Serialise
  3. | Deserialise
  4. | Consume
type t
val t : t Type.t
val is_empty : t -> bool
val empty : unit -> t
val copy : into:t -> t -> unit

Modes

val set_mode : t -> mode -> unit
val with_produce : (t -> start_serialise:(unit -> unit) -> 'a) -> 'a
val with_consume : (t -> stop_deserialise:(unit -> unit) -> 'a) -> 'a

Interactions With Tree

val add_contents_from_store : t -> Backend.Hash.t -> Backend.Contents.Val.t -> unit
val add_node_from_store : t -> Backend.Hash.t -> Backend.Node.Val.t -> Backend.Node.Val.t

add_node_from_store returns a node and not unit because Env may take the opportunity to wrap the input node in Node.Val.with_handler.

val add_contents_from_proof : t -> Backend.Hash.t -> Backend.Contents.Val.t -> unit
val add_pnode_from_proof : t -> Backend.Hash.t -> Backend.Node_portable.t -> unit
val find_contents : t -> Backend.Hash.t -> Backend.Contents.Val.t option
val find_node : t -> Backend.Hash.t -> Backend.Node.Val.t option
val find_pnode : t -> Backend.Hash.t -> Backend.Node_portable.t option