package tezos-protocol-007-PsDELPH1

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t
type context = t
val mem : context -> Raw_context.key -> bool Lwt.t

Tells if the key is already defined as a value.

val dir_mem : context -> Raw_context.key -> bool Lwt.t

Tells if the key is already defined as a directory.

val get : context -> Raw_context.key -> (Raw_context.value, Tezos_protocol_environment_007_PsDELPH1__Environment.Error_monad.error list) result Lwt.t

Retrieve 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 Lwt.t

Retrieves 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_007_PsDELPH1__Environment.Error_monad.error list) result Lwt.t

Allocates 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_007_PsDELPH1__Environment.Error_monad.error list) result Lwt.t

Updates the content of the bucket ; returns a Storage_error Missing_key if the value does not exists.

Allocates 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 Lwt.t

When 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, 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_007_PsDELPH1__Environment.Error_monad.error list) result Lwt.t

Delete the storage bucket ; returns a Storage_error Missing_key if the bucket does not exists.

Removes the storage bucket and its contents ; does nothing if the bucket does not exists.

val remove_rec : context -> Raw_context.key -> context Lwt.t

Recursively removes all the storage buckets and contents ; does nothing if no bucket exists.

val copy : context -> from:Raw_context.key -> to_:Raw_context.key -> (context, Tezos_protocol_environment_007_PsDELPH1__Environment.Error_monad.error list) result Lwt.t
val fold : context -> Raw_context.key -> init:'a -> f:([ `Key of Raw_context.key | `Dir of Raw_context.key ] -> 'a -> 'a Lwt.t) -> 'a Lwt.t

Iterator on all the items of a given directory.

Recursively list all subkeys of a given key.

val fold_keys : context -> Raw_context.key -> init:'a -> f:(Raw_context.key -> 'a -> 'a Lwt.t) -> 'a Lwt.t

Recursive iterator on all the subkeys of a given key.

Internally used in Storage_functors to escape from a view.

val absolute_key : context -> Raw_context.key -> Raw_context.key

Internally 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_007_PsDELPH1__Environment.Error_monad.error list) result

Internally used in Storage_functors to consume gas from within a view.

val check_enough_gas : context -> Gas_limit_repr.cost -> (unit, Tezos_protocol_environment_007_PsDELPH1__Environment.Error_monad.error list) result

Check if consume_gas will fail

val description : context Storage_description.t