Module Mac_address.TableSource

Sourcetype key = t
Sourcetype ('a, 'b) hashtbl = ('a, 'b) Core.Hashtbl.t
Sourcetype 'b t = (key, 'b) hashtbl
include Ppx_compare_lib.Equal.S1 with type 'b t := 'b t
Sourceval equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
include Ppx_compare_lib.Equal.S1__local with type 'b t := 'b t
Sourceval sexp_of_t : ('b -> Sexplib0.Sexp.t) -> 'b t -> Sexplib0.Sexp.t
Sourcetype ('a, 'b) t_ = 'b t
Sourcetype 'a key_ = key
Sourceval hashable : key Base.Hashable.t
include Base.Invariant.S1 with type 'b t := 'b t
Sourceval invariant : ('a -> unit) -> 'a t -> unit
include Core.Hashtbl_intf.Creators with type ('a, 'b) t := ('a, 'b) t_ with type 'a key := 'a key_ with type ('key, 'data, 'z) create_options := ('key, 'data, 'z) Core.Hashtbl_intf.create_options_without_hashable
Sourceval create : ('key key_, 'data, unit -> ('key, 'data) t_) Core.Hashtbl_intf.create_options_without_hashable

Creates a new empty dictionary.

Sourceval of_alist : ('key key_, 'data, ('key key_ * 'data) list -> [ `Ok of ('key, 'data) t_ | `Duplicate_key of 'key key_ ]) Core.Hashtbl_intf.create_options_without_hashable

Dictionary containing the given key/value pairs. Fails if there are duplicate keys.

Sourceval of_alist_report_all_dups : ('key key_, 'data, ('key key_ * 'data) list -> [ `Ok of ('key, 'data) t_ | `Duplicate_keys of 'key key_ list ]) Core.Hashtbl_intf.create_options_without_hashable

Like of_alist. On failure, provides all duplicate keys instead of a single representative.

Sourceval of_alist_or_error : ('key key_, 'data, ('key key_ * 'data) list -> ('key, 'data) t_ Base.Or_error.t) Core.Hashtbl_intf.create_options_without_hashable

Like of_alist. Returns a Result.t.

Sourceval of_alist_exn : ('key key_, 'data, ('key key_ * 'data) list -> ('key, 'data) t_) Core.Hashtbl_intf.create_options_without_hashable

Like of_alist. Raises on duplicates.

Sourceval of_alist_multi : ('key key_, 'data list, ('key key_ * 'data) list -> ('key, 'data list) t_) Core.Hashtbl_intf.create_options_without_hashable

Produces a dictionary mapping each key to a list of associated values.

Sourceval create_mapped : ('key key_, 'data, get_key:('a -> 'key key_) @ local -> get_data:('a -> 'data) @ local -> 'a list -> [ `Ok of ('key, 'data) t_ | `Duplicate_keys of 'key key_ list ]) Core.Hashtbl_intf.create_options_without_hashable

Like of_alist. Consume a list of elements for which key/value pairs can be computed.

Sourceval create_with_key : ('key key_, 'data, get_key:('data -> 'key key_) @ local -> 'data list -> [ `Ok of ('key, 'data) t_ | `Duplicate_keys of 'key key_ list ]) Core.Hashtbl_intf.create_options_without_hashable

Like of_alist. Consume values for which keys can be computed.

Sourceval create_with_key_or_error : ('key key_, 'data, get_key:('data -> 'key key_) @ local -> 'data list -> ('key, 'data) t_ Base.Or_error.t) Core.Hashtbl_intf.create_options_without_hashable

Like of_alist_or_error. Consume values for which keys can be computed.

Sourceval create_with_key_exn : ('key key_, 'data, get_key:('data -> 'key key_) @ local -> 'data list -> ('key, 'data) t_) Core.Hashtbl_intf.create_options_without_hashable

Like of_alist_exn. Consume values for which keys can be computed.

Sourceval group : ('key key_, 'data, get_key:('a -> 'key key_) @ local -> get_data:('a -> 'data) @ local -> combine:('data -> ('data -> 'data) @ local) @ local -> 'a list -> ('key, 'data) t_) Core.Hashtbl_intf.create_options_without_hashable

Like create_mapped. Multiple values for a key are combined rather than producing an error.