Storage_functors.Make_subcontextmodule C : Raw_context.Tmodule N : Storage_sigs.NAMEtype t = C.ttype context = tval mem :
context ->
Raw_context.key ->
bool Tezos_protocol_environment_001_PtCJ7pwo.Lwt.tTells if the key is already defined as a value.
val dir_mem :
context ->
Raw_context.key ->
bool Tezos_protocol_environment_001_PtCJ7pwo.Lwt.tTells if the key is already defined as a directory.
val get :
context ->
Raw_context.key ->
Raw_context.value
Tezos_protocol_environment_001_PtCJ7pwo.Error_monad.tzresult
Tezos_protocol_environment_001_PtCJ7pwo.Lwt.tRetrieve the value from the storage bucket ; returns a Storage_errorMissing_key if the key is not set.
val get_option :
context ->
Raw_context.key ->
Raw_context.value option Tezos_protocol_environment_001_PtCJ7pwo.Lwt.tRetrieves the value from the storage bucket ; returns None if the data is not initialized.
val init :
context ->
Raw_context.key ->
Raw_context.value ->
context Tezos_protocol_environment_001_PtCJ7pwo.Error_monad.tzresult
Tezos_protocol_environment_001_PtCJ7pwo.Lwt.tAllocates the storage bucket and initializes it ; returns a Storage_errorExisting_key if the bucket exists.
val set :
context ->
Raw_context.key ->
Raw_context.value ->
context Tezos_protocol_environment_001_PtCJ7pwo.Error_monad.tzresult
Tezos_protocol_environment_001_PtCJ7pwo.Lwt.tUpdates the content of the bucket ; returns a Storage_error
Missing_key if the value does not exists.
val init_set :
context ->
Raw_context.key ->
Raw_context.value ->
context Tezos_protocol_environment_001_PtCJ7pwo.Lwt.tAllocates the data and initializes it with a value ; just updates it if the bucket exists.
val set_option :
context ->
Raw_context.key ->
Raw_context.value option ->
context Tezos_protocol_environment_001_PtCJ7pwo.Lwt.tWhen the value is Some v, allocates the data and initializes it with v ; just updates it if the bucket exists. When the valus is None, delete the storage bucket when the value ; does nothing if the bucket does not exists.
val delete :
context ->
Raw_context.key ->
context Tezos_protocol_environment_001_PtCJ7pwo.Error_monad.tzresult
Tezos_protocol_environment_001_PtCJ7pwo.Lwt.tDelete the storage bucket ; returns a Storage_error
Missing_key if the bucket does not exists.
val remove :
context ->
Raw_context.key ->
context Tezos_protocol_environment_001_PtCJ7pwo.Lwt.tRemoves the storage bucket and its contents ; does nothing if the bucket does not exists.
val remove_rec :
context ->
Raw_context.key ->
context Tezos_protocol_environment_001_PtCJ7pwo.Lwt.tRecursively removes all the storage buckets and contents ; does nothing if no bucket exists.
val fold :
context ->
Raw_context.key ->
init:'a ->
f:
([ `Key of Raw_context.key | `Dir of Raw_context.key ] ->
'a ->
'a Tezos_protocol_environment_001_PtCJ7pwo.Lwt.t) ->
'a Tezos_protocol_environment_001_PtCJ7pwo.Lwt.tIterator on all the items of a given directory.
val keys :
context ->
Raw_context.key ->
Raw_context.key list Tezos_protocol_environment_001_PtCJ7pwo.Lwt.tRecursively list all subkeys of a given key.
val fold_keys :
context ->
Raw_context.key ->
init:'a ->
f:(Raw_context.key -> 'a -> 'a Tezos_protocol_environment_001_PtCJ7pwo.Lwt.t) ->
'a Tezos_protocol_environment_001_PtCJ7pwo.Lwt.tRecursive iterator on all the subkeys of a given key.
val project : context -> Raw_context.root_contextInternally used in Storage_functors to escape from a view.
val absolute_key : context -> Raw_context.key -> Raw_context.keyInternally used in Storage_functors to retrieve a full key from partial key relative a view.
val consume_gas :
context ->
Gas_limit_repr.cost ->
context Tezos_protocol_environment_001_PtCJ7pwo.Error_monad.tzresultInternally used in Storage_functors to consume gas from within a view.
val check_enough_gas :
context ->
Gas_limit_repr.cost ->
unit Tezos_protocol_environment_001_PtCJ7pwo.Error_monad.tzresultCheck if consume_gas will fail
val description : context Storage_description.t