package tezos-protocol-alpha

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type context = Raw_context.t * id
type elt

The type of elements.

val mem : context -> elt -> (Raw_context.t * bool, Tezos_protocol_environment_alpha__Environment.Error_monad.error Tezos_protocol_environment_alpha__Environment.Error_monad.trace) Stdlib.result Lwt.t

Tells whether an elt is a member of the set. Consumes Gas_repr.read_bytes_cost Z.zero

val init : context -> elt -> (Raw_context.t * int, Tezos_protocol_environment_alpha__Environment.Error_monad.error Tezos_protocol_environment_alpha__Environment.Error_monad.trace) Stdlib.result Lwt.t

Adds an elt as a member of the set. Consumes Gas_repr.write_bytes_cost <size of the new value>. Returns the the new size.

val remove : context -> elt -> (Raw_context.t * int * bool, Tezos_protocol_environment_alpha__Environment.Error_monad.error Tezos_protocol_environment_alpha__Environment.Error_monad.trace) Stdlib.result Lwt.t

Removes an elt from the set ; does nothing if not a member. Consumes Gas_repr.write_bytes_cost Z.zero. Returns the freed size, and a boolean indicating if a value was already associated to this key.

val fold_keys_unaccounted : context -> init:'acc -> f:(elt -> 'acc -> 'acc Lwt.t) -> 'acc Lwt.t
OCaml

Innovation. Community. Security.