Verify.Registryval hash : t -> (bytes, invalid_argument_error) Stdlib.resulthash registry computes the Merkle root hash of registry, derived from the root hashes of all its databases.
val size : t -> (int64, invalid_argument_error) Stdlib.resultsize registry returns the number of databases currently held in registry.
val resize : t -> int64 -> (unit, invalid_argument_error) Stdlib.resultresize registry n adjusts registry to contain exactly n databases. The size can only change by one at a time; call this function in a loop for larger adjustments. Growing appends a new empty database; shrinking drops the last database. Returns an error if |current_size - n| > 1.
val copy_database :
t ->
src:int64 ->
dst:int64 ->
(unit, invalid_argument_error) Stdlib.resultcopy_database registry ~src ~dst duplicates all contents of the database at index src into index dst, completely replacing the previous contents of dst. The source database is unchanged. Copying to the same index is a no-op. Returns an error if src or dst is out of bounds.
val move_database :
t ->
src:int64 ->
dst:int64 ->
(unit, invalid_argument_error) Stdlib.resultmove_database registry ~src ~dst transfers the database at index src to index dst, completely replacing the previous contents of dst. The source is replaced with a fresh empty database. Moving to the same index is a no-op. Returns an error if src or dst is out of bounds.
val clear : t -> int64 -> (unit, invalid_argument_error) Stdlib.resultclear registry db_index replaces the database at db_index with a fresh empty database. Returns an error if db_index is out of bounds.