package octez-proto-libs

  1. Overview
  2. Docs

The module for representing the hash version of a context

The type for hash versions.

include Compare.S with type t := t
val (=) : t -> t -> bool

x = y iff compare x y = 0

val (<>) : t -> t -> bool

x <> y iff compare x y <> 0

val (<) : t -> t -> bool

x < y iff compare x y < 0

val (<=) : t -> t -> bool

x <= y iff compare x y <= 0

val (>=) : t -> t -> bool

x >= y iff compare x y >= 0

val (>) : t -> t -> bool

x > y iff compare x y > 0

val compare : t -> t -> int

compare an alias for the functor parameter's compare function

val equal : t -> t -> bool

equal x y iff compare x y = 0

val max : t -> t -> t

max x y is x if x >= y otherwise it is y

val min : t -> t -> t

min x y is x if x <= y otherwise it is y

val pp : Format.formatter -> t -> unit

pp is the pretty-printer for hash versions.

val encoding : t Data_encoding.t

encoding is the data encoding for hash versions.

val of_int : int -> t

of_int i is the hash version equivalent to i. This function raises Invalid_argument if i is not an unsigned 16-bit integer.

OCaml

Innovation. Community. Security.