Skip to content

Commit

Permalink
response-state: Put Reqd.response_state in its own module
Browse files Browse the repository at this point in the history
This is part of #172
  • Loading branch information
seliopou committed Apr 28, 2020
1 parent 16a2486 commit 76293ce
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/reqd.ml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@
type error =
[ `Bad_request | `Bad_gateway | `Internal_server_error | `Exn of exn ]

type response_state =
| Waiting of Optional_thunk.t ref
| Complete of Response.t
| Streaming of Response.t * [`write] Body.t
module Response_state = struct
type t =
| Waiting of Optional_thunk.t ref
| Complete of Response.t
| Streaming of Response.t * [`write] Body.t
end

type error_handler =
?request:Request.t -> error -> (Headers.t -> [`write] Body.t) -> unit
Expand Down Expand Up @@ -74,7 +76,7 @@ type t =
; response_body_buffer : Bigstringaf.t
; error_handler : error_handler
; mutable persistent : bool
; mutable response_state : response_state
; mutable response_state : Response_state.t
; mutable error_code : [`Ok | error ]
}

Expand Down

0 comments on commit 76293ce

Please sign in to comment.