Module Mavryk_rpc.Answer

type 'o t = [
  1. | `Ok of 'o
  2. | `OkChunk of 'o
  3. | `OkStream of 'o stream
  4. | `Created of string option
  5. | `No_content
  6. | `Unauthorized of Mavryk_error_monad.Error_monad.error list option
  7. | `Forbidden of Mavryk_error_monad.Error_monad.error list option
  8. | `Not_found of Mavryk_error_monad.Error_monad.error list option
  9. | `Conflict of Mavryk_error_monad.Error_monad.error list option
  10. | `Gone of Mavryk_error_monad.Error_monad.error list option
  11. | `Error of Mavryk_error_monad.Error_monad.error list option
]

Return type for service handler

and 'a stream = 'a Resto_directory.Answer.stream = {
  1. next : unit -> 'a option Lwt.t;
  2. shutdown : unit -> unit;
}
val return : 'o -> 'o t Lwt.t
val return_chunked : 'o -> 'o t Lwt.t
val return_unit : unit t Lwt.t
val return_stream : 'o stream -> 'o t Lwt.t
val not_found : 'o t Lwt.t
val gone : 'o t Lwt.t
val fail : Mavryk_error_monad.Error_monad.error list -> 'a t Lwt.t