package octez-l2-libs
Parameters
module B : Store_sigs.BACKEND
Signature
type +'a t = 'a B.t
module Make_updatable_map
(S : Store_sigs.STORAGE_INFO)
(K : Store_sigs.KEY)
(V : Store_sigs.VALUE) :
Store_sigs.Map
with type 'a store = 'a t
and type key = K.key
and type value = V.value
Make_updatable_map(S)(K)(V)
constructs a Map
which can be persisted on store. The module S
defines storage-dependent information about how the map will be saved on and retrieved from the store (for example, it defines the map location in the store). The module K
defines the information related to keys of the map, and the module V
contains information about how values will be stored to and retrieved from the store. The resulting map allows to update the contents of an existing value for a key.
module Make_append_only_map
(S : Store_sigs.STORAGE_INFO)
(K : Store_sigs.KEY)
(V : Store_sigs.VALUE) :
Store_sigs.Append_only_map
with type 'a store = 'a t
and type key = K.key
and type value = V.value
Make_append_only_map(S)(K)(V)
constructs an Append_only_map
which can be persisted on store. The module S
defines storage-dependent information about how the map will be saved on and retrieved from the store (for example, it defines the map location in the store). The module K
contains information related to keys of the map, and the module V
contains information about how values will be stored to and retrieved from the store. The resulting map forbids updating the contents of an existing value with a new value, different from the previous one.
module Make_mutable_value
(S : Store_sigs.STORAGE_INFO)
(V : Store_sigs.VALUE) :
Store_sigs.Mutable_value with type 'a store = 'a t and type value = V.value
Make_mutable_value(S)(V)
constructs a Mutable_value
for persisting a mutable value in a store. The module parameter S
defines the location of the mutable value in the store, and the module parameter V
contains information about the type of values that the constructed module will persist in the underlying store.
module Make_nested_map
(S : Store_sigs.STORAGE_INFO)
(K1 : Store_sigs.KEY)
(K2 : Store_sigs.COMPARABLE_KEY)
(V : Store_sigs.VALUE) :
Store_sigs.Nested_map
with type 'a store = 'a t
and type primary_key = K1.key
and type secondary_key = K2.key
and type value = V.value
Make_nested_map(S)(K1)(K2)(V) constructs a Nested_map
module using module parameter S
to define where the map is going to be persisted on store, K1
and K2
to define the primary and secondary key, respectively, and V
to define the values of the resulting Nested_map
.