package fuseau

  1. Overview
  2. Docs
A simple IO and concurrency library for OCaml 5

Install

Dune Dependency

Authors

Maintainers

Sources

fuseau-0.1.tbz
sha256=8a9339d239aa371d0c4aceb23d7601a1b7da8f42d84542cee30669cc95addb6a
sha512=fa656c7311371344f0c6ebf08c666afc33296558ccc678ed87baf2f9ba54035cd4c5caca4257212416296fcdbdfc1687c46cc2ebea3548c792ea72602b85b832

doc/fuseau.unix/Fuseau_unix/IO_unix/Out/index.html

Module IO_unix.OutSource

include module type of Fuseau.Iostream.Out
Sourceclass type t = object ... end

An output stream, ie. a place into which we can write bytes.

Sourceval create : ?flush:(unit -> unit) -> ?close:(unit -> unit) -> output_char:(char -> unit) -> output:(bytes -> int -> int -> unit) -> unit -> t

Create a new output stream from raw components.

Sourceval dummy : t

Dummy output, drops everything written to it.

Sourceval of_buffer : Buffer.t -> t

of_buffer buf is an output channel that writes directly into buf. flush and close have no effect.

Sourceval output_char : t -> char -> unit

Output a single char

Sourceval output : t -> bytes -> int -> int -> unit

Write the slice of bytes.

Sourceval close : t -> unit

Close the stream. Idempotent.

Sourceval flush : t -> unit

Ensure the bytes written so far are indeed written to the underlying storage/network socket/… and are not just sitting in a buffer.

Sourceval output_string : t -> string -> unit

Output the whole string.

Sourceval output_line : t -> string -> unit

Output the whole string followed by '\n'.

Sourceval output_lines : t -> string Seq.t -> unit

Output a series of lines, each terminated by '\n'.

Sourceval output_int : t -> int -> unit

Output an integer in decimal notation.

Sourceval tee : t list -> t

tee ocs is an output that accepts bytes and writes them to every output in ocs. When closed, it closes all elements of oc.

Sourceval of_unix_fd : ?close_noerr:bool -> ?buf:bytes -> file_descr -> t
OCaml

Innovation. Community. Security.