package twirp_core

  1. Overview
  2. Docs

Code for error.proto

Types

type error = {
  1. code : string;
  2. msg : string;
}

Basic values

val default_error : ?code:string -> ?msg:string -> unit -> error

default_error () is the default value for type error

Formatters

val pp_error : Stdlib.Format.formatter -> error -> unit

pp_error v formats v

Protobuf YoJson Encoding

val encode_json_error : error -> Yojson.Basic.t

encode_json_error v encoder encodes v to to json

JSON Decoding

val decode_json_error : Yojson.Basic.t -> error

decode_json_error decoder decodes a error value from decoder

OCaml

Innovation. Community. Security.