package batteries
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=e4b70d1a716f0aaba36f419f618d0a2e
sha512=a31f1f8cf2c7c3c6c757f3bfae98ff61bb32bab6a1f1e215937df42bcfa447aad41a37edb28d7bcecb88b3838ed8bd57142bcf8e2d28e09bb538055fd8a3b72d
doc/batteries.unthreaded/BatHashtbl/Cap/index.html
Module BatHashtbl.Cap
Capabilities for hashtables.
@documents Hashtbl.Cap
Constructors
val create : int -> ('a, 'b, _) tAdopt a regular hashtable as a capability hashtble, allowing to decrease capabilities if necessary.
This operation involves no copying. In other words, in let cap = of_table a in ..., any modification in a will also have effect on cap and reciprocally.
Return a capability hashtable as a regular hashtable.
This operation requires both read and write permissions on the capability table and involves no copying. In other words, in let a = of_table cap in ..., any modification in a will also have effect on cap and reciprocally.
Drop to read-only permissions.
This operation involves no copying.
Drop to write-only permissions.
This operation involves no copying.
Base operations
val length : ('a, 'b, _) t -> intval is_empty : ('a, 'b, _) t -> boolval add : ('a, 'b, [> `Write ]) t -> 'a -> 'b -> unitval remove : ('a, 'b, [> `Write ]) t -> 'a -> unitval remove_all : ('a, 'b, [> `Write ]) t -> 'a -> unitval replace : ('a, 'b, [> `Write ]) t -> 'a -> 'b -> unitval clear : ('a, 'b, [> `Write ]) t -> unitSearching
val find : ('a, 'b, [> `Read ]) t -> 'a -> 'bval find_all : ('a, 'b, [> `Read ]) t -> 'a -> 'b listval find_default : ('a, 'b, [> `Read ]) t -> 'a -> 'b -> 'bval find_option : ('a, 'b, [> `Read ]) t -> 'a -> 'b optionval exists : ('a -> 'b -> bool) -> ('a, 'b, [> `Read ]) t -> boolval mem : ('a, 'b, [> `Read ]) t -> 'a -> boolTraversing
val iter : ('a -> 'b -> unit) -> ('a, 'b, [> `Read ]) t -> unitval for_all : ('a -> 'b -> bool) -> ('a, 'b, [> `Read ]) t -> boolval fold : ('a -> 'b -> 'c -> 'c) -> ('a, 'b, [> `Read ]) t -> 'c -> 'cval map_inplace : ('a -> 'b -> 'b) -> ('a, 'b, [> `Write ]) t -> unitval filter_inplace : ('a -> bool) -> ('key, 'a, [> `Write ]) t -> unitval filteri_inplace : ('key -> 'a -> bool) -> ('key, 'a, [> `Write ]) t -> unitval filter_map_inplace :
('key -> 'a -> 'a option) ->
('key, 'a, [> `Write ]) t ->
unitConversions
val to_list : ('a, 'b, [> `Read ]) t -> ('a * 'b) listval of_list : ('a * 'b) list -> ('a, 'b, _) tBoilerplate code
Printing
val print :
?first:string ->
?last:string ->
?sep:string ->
?kvsep:string ->
('a BatInnerIO.output -> 'b -> unit) ->
('a BatInnerIO.output -> 'c -> unit) ->
'a BatInnerIO.output ->
('b, 'c, [> `Read ]) t ->
unitOverride modules
module Exceptionless : sig ... endOperations on BatHashtbl.Cap without exceptions.
module Labels : sig ... endOperations on BatHashtbl.Cap with labels.