Mac_addressSourceFunctions for working with and formatting 48-bit MAC addresses.
private Int63.t to enable immediate-type optimizations on 64-bit platforms.
include Ppx_compare_lib.Comparable.S with type t := tinclude Ppx_compare_lib.Comparable.S__local with type t := tinclude Core.Comparator.S__portable with type t := tof_string and t_of_sexp accept any string-style notation (see String_style below). They accept both lowercase and uppercase hex digits. to_string and sexp_of_t use Dash style and lowercase hex digits.
include Core.Identifiable.S_plain
with type t := t
and type comparator_witness := comparator_witnessinclude Ppx_compare_lib.Comparable.S with type t := tinclude Ppx_hash_lib.Hashable.S with type t := tinclude Base.Stringable.S with type t := tinclude Base.Stringable.Of_stringable with type t := tinclude Base.Stringable.To_stringable with type t := tinclude Base.Pretty_printer.S with type t := tinclude Core.Comparable.S_plain
with type t := t
with type comparator_witness := comparator_witnessinclude Base.Comparable.S
with type t := t
with type comparator_witness := comparator_witnessinclude Base.Comparisons.S with type t := tascending is identical to compare. descending x y = ascending y x. These are intended to be mnemonic when used like List.sort ~compare:ascending and List.sort ~cmp:descending, since they cause the list to be sorted in ascending or descending order, respectively.
clamp_exn t ~min ~max returns t', the closest value to t such that between t' ~low:min ~high:max is true.
Raises if not (min <= max).
include Base.Comparator.S
with type t := t
with type comparator_witness := comparator_witnessmodule Map :
Core.Map.S_plain
with type Key.t = t
with type Key.comparator_witness = comparator_witnessmodule Set :
Core.Set.S_plain
with type Elt.t = t
with type Elt.comparator_witness = comparator_witnessinclude Core.Hashable.S_plain with type t := tinclude Ppx_compare_lib.Comparable.S with type t := tinclude Sexplib0.Sexpable.Sexp_of__stack with type t := tMore significant bytes in the integer go first in the address:
0x112233445566 <-> 11-22-33-44-55-66
to_string_with_style produces the dash-, colon-, or dot-separated string representation of the given MAC. It produces only lowercase hex digits.
to_string_colon is an alias for: to_string_with_style ~style:Colon
to_string_compact is an alias for: to_string_with_style ~style:Compact
to_string_dash is an alias for: to_string_with_style ~style:Dash
to_string_dot is an alias for: to_string_with_style ~style:Dot
random_incl ~state lo hi returns a random t between lo (inclusive) and hi (inclusive). Raises if lo > hi. The comparison is such that the first byte in the address is the most significant, i.e. 00-00-00-00-00-01 < 01-00-00-00-00-00.
The default ~state is Random.State.default.
Unstable provides (de)serializations that may change over time. In general, we suggest using Stable, below, for (de)serializations.