`sig
exception Interrupted of exn
exception Cancelled
exception Already_read
exception Finalized
type 'a stream
type 'a step = private
Finished of 'a Ocsigen_stream.stream option
| Cont of 'a * 'a Ocsigen_stream.stream
type 'a t
type outcome = [ `Failure | `Success ]
val make :
?finalize:(Ocsigen_stream.outcome -> 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 -> (Ocsigen_stream.outcome -> unit Lwt.t) -> unit
val finalize : 'a Ocsigen_stream.t -> Ocsigen_stream.outcome -> 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 : int -> 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 -> int64 -> 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
val of_lwt_stream : 'a Lwt_stream.t -> 'a Ocsigen_stream.t
val to_lwt_stream :
?is_empty:('a -> bool) -> 'a Ocsigen_stream.t -> 'a Lwt_stream.t
module StringStream :
sig
type out = string Ocsigen_stream.t
type m
val make :
Ocsigen_stream.StringStream.m -> Ocsigen_stream.StringStream.out
val empty : Ocsigen_stream.StringStream.m
val put : string -> Ocsigen_stream.StringStream.m
val concat :
Ocsigen_stream.StringStream.m ->
Ocsigen_stream.StringStream.m -> Ocsigen_stream.StringStream.m
end
val set_net_buffer_size : int -> unit
end`