Irmin_store.Make
module N : sig ... end
include Store_sigs.BACKEND
The type for representing storage backends that can be accessed by the module. The type parameter indicates whether the storage can be only read or both read and written.
val make_key_path :
Store_sigs.path ->
Store_sigs.key_path_representation ->
Store_sigs.path
make_key_path path raw_key
constructs a new path from path
and the raw_key
key_path_representation.
val load :
'a Store_sigs.mode ->
string ->
'a t Mavryk_base.TzPervasives.tzresult Lwt.t
load location
loads the backend storage from location
.
val flush : [> `Write ] t -> unit Mavryk_base.TzPervasives.tzresult
flush location
flushes to disk a sequence of changes to the data stored at location
.
val close : _ t -> unit Mavryk_base.TzPervasives.tzresult Lwt.t
close t
closes the storage backend t
.
val set :
[> `Write ] t ->
Store_sigs.path ->
bytes ->
unit Mavryk_base.TzPervasives.tzresult Lwt.t
set_exn t path b
sets the contents for the store t
at path
to the sequence of bytes b
. The write operation can fail, in which case an exception is thrown.
val get :
[> `Read ] t ->
Store_sigs.path ->
bytes Mavryk_base.TzPervasives.tzresult Lwt.t
get t path
returns the contents for the store t
at the location indicated by path
. It can fail if t
does not have any content stored at path
.
val mem :
[> `Read ] t ->
Store_sigs.path ->
bool Mavryk_base.TzPervasives.tzresult Lwt.t
mem t path
returns whether the storage backend t
contains any data at the location indicated by path
.
val find :
[> `Read ] t ->
Store_sigs.path ->
bytes option Mavryk_base.TzPervasives.tzresult Lwt.t
find t path
is the same as get t path
, except that an optional value is returned. This value is None
if the backend storage t
does not have any content stored at location path
.
val path_to_string : Store_sigs.path -> string
path_to_string
converts a path to a string.
module Raw_irmin : sig ... end