Insider.Lab.Output (Insider Lab v0.1.0)

Copy Markdown View Source

The single writer for the machine output of every Lab Mix task and the insider-lab escript.

Their documents are UTF-8 bytes. IO.binwrite/2 re-encodes every byte as a Latin-1 character on a device in Unicode mode, as standard output is under Mix, so … would print as …; this writer hands the bytes to such a device as characters and to a Latin-1 device unchanged.

Summary

Functions

Writes the UTF-8 bytes of iodata to device unchanged and returns :ok, or the device's {:error, reason}. Integers in iodata are bytes, never code points.

Functions

write(iodata, device \\ :standard_io)

@spec write(iodata(), IO.device()) :: :ok | {:error, term()}

Writes the UTF-8 bytes of iodata to device unchanged and returns :ok, or the device's {:error, reason}. Integers in iodata are bytes, never code points.