Grpc.Status
val pp_code :
Ppx_deriving_runtime.Format.formatter ->
code ->
Ppx_deriving_runtime.unit
val show_code : code -> Ppx_deriving_runtime.string
code
represents the valid gRPC status codes to respond with.
val int_of_code : code -> int
int_of_code c
returns the corresponding integer status code for c
.
val code_of_int : int -> code option
code_of_int i
returns the corresponding code for i
if it exists.
val pp :
Ppx_deriving_runtime.Format.formatter ->
t ->
Ppx_deriving_runtime.unit
val show : t -> Ppx_deriving_runtime.string
v ~message code
creates a new status with the given code
and message
.
val message : t -> string option
message t
returns the message associated with t
, if there is one.
val extract_status : H2.Headers.t -> t
extract_status headers
returns the status embedded in the headers, or a default when the status is invalid or missing.