Plebeia.Node_storageSourceval write_node :
?clear:bool ->
Context.t ->
Node_type.node ->
(Node_type.node * Index.t * Hash.Prefix.t, Error.t) resultWrite a node to the storage, and returns the updated version of the node with its index and hash.
If clear=true, then it forgets the details of the given node after the commit and returns a Disk _ node points to the commit.
Note that this function does not update the header. Storage.commit must be called to make the written node persistent.
Read the node at the given index of the context, parse it and create a view node with it.
Note: load_node does not load the hash. Use load_hash_prefix for hashes.
val read_hash :
Context.t ->
Node_type.t ->
[> `Hashed of Hash.t * Node_type.t | `Not_Hashed of Node_type.view ]Read hash if it is not yet
Obtain the view of the node. If the view is not available in the memory, it is loaded from the storage.
If the node is Hash h, it raises HashOnly h.
Note: view does not load the hash.
Recusively visit and load all the subnodes in memory.
(if reset_index, all the indices are reset to Not_Indexed.)
Note: load_node_fully does not load the hash.
Copy the node from src context to another context dst
val internal :
Context.t ->
(Node_type.node * Node_type.node * Node_type.indexed * Node_type.hashed) ->
Node_type.nodeval bud :
Context.t ->
(Node_type.node option * Node_type.indexed * Node_type.hashed) ->
Node_type.nodeval extender :
Context.t ->
(Segment.t * Node_type.node * Node_type.indexed * Node_type.hashed) ->
Node_type.node