package cohttp-mirage

  1. Overview
  2. Docs

Parameters

Signature

include Cohttp.S.IO with type 'a t = 'a Lwt.t with type ic = Channel.t with type oc = Channel.t with type conn = Channel.flow
type 'a t = 'a Lwt.t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val return : 'a -> 'a t
type ic = Channel.t
type oc = Channel.t
type conn = Channel.flow
val read_line : ic -> string option t
val read : ic -> int -> string t
val write : oc -> string -> unit t
val flush : oc -> unit t
type error
val catch : (unit -> 'a t) -> ('a, error) Stdlib.result t

catch f is f () >|= Result.ok, unless f fails with an IO error, in which case it returns the error.

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

Innovation. Community. Security.