package vif

  1. Overview
  2. Docs

Module Stream.SourceSource

Sourceval file : ?offset:int -> string -> string source
Sourceval list : 'a list -> 'a source

list lst is a source will all elements from the lst list.

Sourceval dispose : 'a source -> unit

dispose src forces the termination of the source state. This function is useful in situations when a leftover source is produced in Stream.run.

NOTE: If the source is not already initialized, calling this function will first initialize its state before it is terminated.

Sourceval with_formatter : (Format.formatter -> unit) -> string source
Sourceval with_task : limit:int -> ('a Bqueue.t -> unit) -> 'a source
Sourceval of_bqueue : 'a Bqueue.t -> 'a source
Sourceval to_reader : string source -> Bytesrw.Bytes.Reader.t
Sourceval each : ('a -> unit) -> 'a source -> unit

each fn src applies an effectful function fn to all elements in src.

OCaml

Innovation. Community. Security.