package octez-shell-libs

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Maps from string lists to bytes. No balancing. A key cannot be a prefix or a suffix to another key.

type 'a t =
  1. | Leaf of 'a
  2. | Node of 'a t String_map.t
exception Collision_with_prefix
exception Collision_with_suffix
val empty : 'a t
val is_empty : 'a t -> bool
val insert : string list -> 'a -> 'a t -> 'a t
val does_not_collide : String_map.key list -> 'a t -> [> `Key_does_not_collide | `Key_exists | `Key_has_prefix | `Key_has_suffix ]
val mem : String_map.key list -> 'a t -> bool
val find_opt : String_map.key list -> 'a t -> 'a option
val to_seq : 'a t -> (String_map.key list * 'a) Tezos_base.TzPervasives.Seq.t
val of_seq : (string list * 'a) Tezos_base.TzPervasives.Seq.t -> 'a t
val fold_lwt : (String_map.key list -> 'a -> 'b -> 'b Lwt.t) -> 'a t -> 'b -> 'b Lwt.t
val sample_uniform : 'a t -> (String_map.key list * 'a) option
OCaml

Innovation. Community. Security.