Bounded.Uint16
Allows to build interval of non-negative int integers representable on 2 bytes. The encoding used is Data_encoding.uint16
regardless of the actual bounds.
module B : BOUNDS with type ocaml_type := int
include BOUNDS with type ocaml_type := int
val encoding : t Data_encoding.t
A (partial) encoding of the datatype. If the encoded value is out of bounds, an exception may be raised. See Data_encoding.conv_with_guard
.
val pp : Format.formatter -> t -> unit
A pretty-printer for values of type t
.
val to_value : t -> int
to_value t
is a projection to the OCaml representation of the bounded value t
.