Module Header_protocol.Message_type_and_errors

type _ t =
| New_single : [ `New_single ] t
| New_group : [ `New_group ] t
| New_group_point : [ `New_group_point ] t
| End_of_header : [ `End_of_header ] t
| Epoch : [ `Epoch ] t
| Need_more_data : [ `Error ] t
| Invalid_message_type_or_subtype : [ `Error ] t
| Message_length_too_short : [ `Error ] t
val sexp_of_t : ('v_x__001_ -> Ppx_sexp_conv_lib.Sexp.t) -> 'v_x__001_ t -> Ppx_sexp_conv_lib.Sexp.t
type packed =
| T : _ t -> packed

all_of_packed does not include the error cases.

val sexp_of_packed : packed -> Ppx_sexp_conv_lib.Sexp.t
val all_of_packed : packed list
module Packed : sig ... end
val to_wire_exn : _ t -> char
val of_wire : char -> packed
val to_index_exn : _ t -> int

to,of_index_exn provide dense packed integers starting from 0, suitable for indexing into an array.

val of_index_exn : int -> packed
val max_index : int