Documentation
tezos-lwt-result-stdlib.bare.functor-outputs lib
Bare_functor_outputs
. Hashtbl
. SeededS
Module type
Hashtables with the signature SeededS
are exception-safe replacements for hashtables with the Stdlib.Hashtbl.SeededS
signature with Lwt- and result-aware traversal functions.
See Lwtreslib
's introductory documentation for explanations regarding _e
-, _s
-, _es
-, _p
-, and _ep
-suffixed functions and exception safety. See Stdlib.Hashtbl.SeededS
for explanations regarding OCaml's seeded hashtables in general.
val create : ?random :bool -> int -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a option
val find_opt : 'a t -> key -> 'a option
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val iter_e :
(key -> 'a -> (unit, 'trace ) Stdlib .result ) ->
'a t ->
(unit, 'trace ) Stdlib .result
val iter_es :
(key -> 'a -> (unit, 'trace ) Stdlib .result Lwt.t ) ->
'a t ->
(unit, 'trace ) Stdlib .result Lwt.t
val iter_ep :
(key -> 'a -> (unit, 'error ) Stdlib .result Lwt.t ) ->
'a t ->
(unit, 'error list ) Stdlib .result Lwt.t
val filter_map_inplace : (key -> 'a -> 'a option ) -> 'a t -> unit
val try_map_inplace : (key -> 'a -> ('a , 'trace ) Stdlib .result ) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b ) -> 'a t -> 'b -> 'b
val fold_e :
(key -> 'a -> 'b -> ('b , 'trace ) Stdlib .result ) ->
'a t ->
'b ->
('b , 'trace ) Stdlib .result
val fold_es :
(key -> 'a -> 'b -> ('b , 'trace ) Stdlib .result Lwt.t ) ->
'a t ->
'b ->
('b , 'trace ) Stdlib .result Lwt.t
val stats : 'a t -> Stdlib .Hashtbl.statistics
val to_seq : 'a t -> (key * 'a ) Stdlib .Seq.t
val to_seq_keys : _ t -> key Stdlib .Seq.t
val to_seq_values : 'a t -> 'a Stdlib .Seq.t
val add_seq : 'a t -> (key * 'a ) Stdlib .Seq.t -> unit
val replace_seq : 'a t -> (key * 'a ) Stdlib .Seq.t -> unit
val of_seq : (key * 'a ) Stdlib .Seq.t -> 'a t