Ocsigen

This is a preliminary version of the documentation. Help us to improve it by filling tickets. We are looking for native english speakers to proof read the documentation. Contact us!

sig
  type 'a t
  val from : (unit -> 'a option Lwt.t) -> 'Lwt_stream.t
  val push_stream :
    unit ->
    ([ `Data of '| `End_of_stream | `Exn of exn ] -> unit) *
    'Lwt_stream.t
  val of_list : 'a list -> 'Lwt_stream.t
  val of_string : string -> char Lwt_stream.t
  val of_event : 'React.event -> 'Lwt_stream.t
  val clone : 'Lwt_stream.t -> 'Lwt_stream.t
  val to_list : 'Lwt_stream.t -> 'a list Lwt.t
  val to_string : char Lwt_stream.t -> string Lwt.t
  exception Empty
  val peek : 'Lwt_stream.t -> 'a option Lwt.t
  val npeek : int -> 'Lwt_stream.t -> 'a list Lwt.t
  val get : 'Lwt_stream.t -> 'a option Lwt.t
  val nget : int -> 'Lwt_stream.t -> 'a list Lwt.t
  val get_while : ('-> bool) -> 'Lwt_stream.t -> 'a list Lwt.t
  val get_while_s : ('-> bool Lwt.t) -> 'Lwt_stream.t -> 'a list Lwt.t
  val next : 'Lwt_stream.t -> 'Lwt.t
  val junk : 'Lwt_stream.t -> unit Lwt.t
  val njunk : int -> 'Lwt_stream.t -> unit Lwt.t
  val junk_while : ('-> bool) -> 'Lwt_stream.t -> unit Lwt.t
  val junk_while_s : ('-> bool Lwt.t) -> 'Lwt_stream.t -> unit Lwt.t
  val junk_old : 'Lwt_stream.t -> unit Lwt.t
  val get_available : 'Lwt_stream.t -> 'a list
  val get_available_up_to : int -> 'Lwt_stream.t -> 'a list
  val is_empty : 'Lwt_stream.t -> bool Lwt.t
  val choose : 'Lwt_stream.t list -> 'Lwt_stream.t
  val map : ('-> 'b) -> 'Lwt_stream.t -> 'Lwt_stream.t
  val map_s : ('-> 'Lwt.t) -> 'Lwt_stream.t -> 'Lwt_stream.t
  val filter : ('-> bool) -> 'Lwt_stream.t -> 'Lwt_stream.t
  val filter_s : ('-> bool Lwt.t) -> 'Lwt_stream.t -> 'Lwt_stream.t
  val filter_map : ('-> 'b option) -> 'Lwt_stream.t -> 'Lwt_stream.t
  val filter_map_s :
    ('-> 'b option Lwt.t) -> 'Lwt_stream.t -> 'Lwt_stream.t
  val map_list : ('-> 'b list) -> 'Lwt_stream.t -> 'Lwt_stream.t
  val map_list_s :
    ('-> 'b list Lwt.t) -> 'Lwt_stream.t -> 'Lwt_stream.t
  val fold : ('-> '-> 'b) -> 'Lwt_stream.t -> '-> 'Lwt.t
  val fold_s : ('-> '-> 'Lwt.t) -> 'Lwt_stream.t -> '-> 'Lwt.t
  val iter : ('-> unit) -> 'Lwt_stream.t -> unit Lwt.t
  val iter_p : ('-> unit Lwt.t) -> 'Lwt_stream.t -> unit Lwt.t
  val iter_s : ('-> unit Lwt.t) -> 'Lwt_stream.t -> unit Lwt.t
  val find : ('-> bool) -> 'Lwt_stream.t -> 'a option Lwt.t
  val find_s : ('-> bool Lwt.t) -> 'Lwt_stream.t -> 'a option Lwt.t
  val find_map : ('-> 'b option) -> 'Lwt_stream.t -> 'b option Lwt.t
  val find_map_s :
    ('-> 'b option Lwt.t) -> 'Lwt_stream.t -> 'b option Lwt.t
  val combine : 'Lwt_stream.t -> 'Lwt_stream.t -> ('a * 'b) Lwt_stream.t
  val append : 'Lwt_stream.t -> 'Lwt_stream.t -> 'Lwt_stream.t
  val concat : 'Lwt_stream.t Lwt_stream.t -> 'Lwt_stream.t
  val flatten : 'a list Lwt_stream.t -> 'Lwt_stream.t
  val parse : 'Lwt_stream.t -> ('Lwt_stream.t -> 'Lwt.t) -> 'Lwt.t
  val hexdump : char Lwt_stream.t -> string Lwt_stream.t
end