package SZXX

  1. Overview
  2. Docs
type t = Base.unit -> [ `String of Base.string | `Bigstring of Bigstringaf.t | `Eof ]

Feeds can also be created manually without going through the convenience functions in this module

val of_flow : ?slice_size:int -> [> Eio.Flow.source_ty ] Eio.Flow.source -> t

Create a Feed.t from a standard Eio.Flow.source

val of_flow_seekable : ?slice_size:int -> ?offset:int -> [> Eio.File.ro_ty ] Eio.File.ro -> t

Same as of_flow, but the resulting Feed.t does not advance the file cursor. In other words, even after processing, the flow will still appear to be "unread". Note: this function requires a flow that supports seeking, such as files.

val of_string_dispenser : (unit -> Base.string option) -> t

Return None to indicate End Of File

val of_bigstring_dispenser : (unit -> Bigstringaf.t option) -> t

Return None to indicate End Of File

val of_string : ?slice_size:int -> Base.String.t -> t

Note: not ideal for extremely large strings. For that, use the other functions in this module.

OCaml

Innovation. Community. Security.