Storage_functors.Make_single_data_storagemodule _ : Storage_sigs.REGISTERmodule C : Raw_context.Tmodule _ : Storage_sigs.NAMEmodule V : Storage_sigs.VALUEtype t = C.ttype context = ttype value = V.tThe type of the value
val mem : context -> bool Mavryk_protocol_environment_alpha.Lwt.tTells if the data is already defined
val get :
context ->
value Mavryk_protocol_environment_alpha.Error_monad.tzresult
Mavryk_protocol_environment_alpha.Lwt.tRetrieve the value from the storage bucket ; returns a Storage_error if the key is not set or if the deserialisation fails
val find :
context ->
value option Mavryk_protocol_environment_alpha.Error_monad.tzresult
Mavryk_protocol_environment_alpha.Lwt.tRetrieves the value from the storage bucket ; returns None if the data is not initialized, or Storage_helpers.Storage_error if the deserialisation fails
val init :
context ->
value ->
Raw_context.t Mavryk_protocol_environment_alpha.Error_monad.tzresult
Mavryk_protocol_environment_alpha.Lwt.tAllocates the storage bucket and initializes it ; returns a Storage_errorExisting_key if the bucket exists
val update :
context ->
value ->
Raw_context.t Mavryk_protocol_environment_alpha.Error_monad.tzresult
Mavryk_protocol_environment_alpha.Lwt.tUpdates the content of the bucket ; returns a Storage_Error
Missing_key if the value does not exist
val add :
context ->
value ->
Raw_context.t Mavryk_protocol_environment_alpha.Lwt.tAllocates the data and initializes it with a value ; just updates it if the bucket exists
val add_or_remove :
context ->
value option ->
Raw_context.t Mavryk_protocol_environment_alpha.Lwt.tWhen the value is Some v, allocates the data and initializes it with v ; just updates it if the bucket exists. When the value is None, deletes the storage bucket ; does nothing if the bucket does not exist.
val remove_existing :
context ->
Raw_context.t Mavryk_protocol_environment_alpha.Error_monad.tzresult
Mavryk_protocol_environment_alpha.Lwt.tDelete the storage bucket ; returns a Storage_error
Missing_key if the bucket does not exist
val remove : context -> Raw_context.t Mavryk_protocol_environment_alpha.Lwt.tRemoves the storage bucket and its contents ; does nothing if the bucket does not exist