(** ERROR/NACK payload codec (8 bytes). {v 0x00 uint8 error_code 0x01 uint8 offending_type 0x02 uint16 offending_apid 0x04 uint16 offending_pay_len 0x06 uint16 reserved v} *) type error_code = | Unknown_type | Unknown_version | Message_too_large | Apid_not_allocated | Host_busy | Malformed val error_code_to_int : error_code -> int (** Convert an error code to its wire representation. *) val error_code_of_int : int -> error_code option (** Parse an error code from its wire representation. *) type t = { error_code : int; offending_type : int; offending_apid : int; offending_pay_len : int; reserved : int; } val codec : t Wire.Codec.t (** Wire codec for the 8-byte error payload. *) val v : error_code -> offending_type:int -> offending_apid:int -> offending_pay_len:int -> t (** [v code ~offending_type ~offending_apid ~offending_pay_len] builds an error payload. *) val pp : t Fmt.t (** Pretty-print an error payload. *) val equal : t -> t -> bool (** Structural equality. *)