package dream-httpaf

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type request_error = [
  1. | `Bad_request of Request.t
  2. | `Parse of string list * string
]
type response_error = [
  1. | `Invalid_response_body_length of Response.t
  2. | `Parse of string list * string
]
type 'error parse_state =
  1. | Done
  2. | Fail of 'error
  3. | Partial of Bigstringaf.t -> off:int -> len:int -> AU.more -> (unit, 'error) Stdlib.result AU.state
type 'error t = {
  1. parser : (unit, 'error) Stdlib.result Angstrom.t;
  2. mutable parse_state : 'error parse_state;
  3. mutable closed : bool;
  4. mutable wakeup : Optional_thunk.t;
}
type request = request_error t
type response = response_error t
val create : (unit, 'a) Stdlib.result Angstrom.t -> 'a t
val ok : (unit, 'a) Stdlib.result t
val is_closed : 'a t -> bool
val on_wakeup : 'a t -> (unit -> unit) -> unit
val wakeup : 'a t -> unit
val request : wakeup:(unit -> unit) -> (Request.t -> Body.Reader.t -> 'a) -> [> `Bad_request of Request.t ] t
val response : Respd.t Stdlib.Queue.t -> [> `Invalid_response_body_length of Response.t ] t
val transition : [> `Parse of string list * string ] as 'a t -> (unit, 'b) Stdlib.result AU.state -> int
val start : [> `Parse of string list * string ] as 'a t -> (unit, 'b) Stdlib.result AU.state -> unit
val _read_with_more : [> `Parse of string list * string ] t -> Bigstringaf.t -> off:int -> len:int -> AU.more -> int
val read_with_more : [> `Parse of string list * string ] t -> Bigstringaf.t -> off:int -> len:int -> AU.more -> int
val force_close : 'a t -> unit
val next : 'a t -> [> `Close | `Error of 'b | `Read | `Start ]
OCaml

Innovation. Community. Security.