`sig
exception Interrupted of exn
exception Cancelled
exception Already_read
exception Finalized
type 'a stream
type 'a step =
Finished of 'a Ocsigen_stream.stream option
| Cont of 'a * 'a Ocsigen_stream.stream
type 'a t
val make :
?finalize:(unit -> unit Lwt.t) ->
(unit -> 'a Ocsigen_stream.step Lwt.t) -> 'a Ocsigen_stream.t
val get : 'a Ocsigen_stream.t -> 'a Ocsigen_stream.stream
val next : 'a Ocsigen_stream.stream -> 'a Ocsigen_stream.step Lwt.t
val empty :
(unit -> 'a Ocsigen_stream.step Lwt.t) option ->
'a Ocsigen_stream.step Lwt.t
val cont :
'a ->
(unit -> 'a Ocsigen_stream.step Lwt.t) -> 'a Ocsigen_stream.step Lwt.t
val add_finalizer : 'a Ocsigen_stream.t -> (unit -> unit Lwt.t) -> unit
val finalize : 'a Ocsigen_stream.t -> unit Lwt.t
val cancel : 'a Ocsigen_stream.t -> unit Lwt.t
val consume : 'a Ocsigen_stream.t -> unit Lwt.t
exception Stream_too_small
exception Stream_error of string
exception String_too_large
val string_of_stream : string Ocsigen_stream.stream -> string Lwt.t
val enlarge_stream :
string Ocsigen_stream.step -> string Ocsigen_stream.step Lwt.t
val stream_want :
string Ocsigen_stream.step -> int -> string Ocsigen_stream.step Lwt.t
val current_buffer : string Ocsigen_stream.step -> string
val skip :
string Ocsigen_stream.step -> int -> string Ocsigen_stream.step Lwt.t
val substream :
string -> string Ocsigen_stream.step -> string Ocsigen_stream.step Lwt.t
val of_file : string -> string Ocsigen_stream.t
val of_string : string -> string Ocsigen_stream.t
end`