flix

0.61.0

DecodingReader

Definitions

def read(dest: Array[Char, rb], reader: DecodingReader[t, rr]): Result[IoError, Int32] \ IO + rr + rb + Aef[t] with Readable[t] where Readable.Elm[t] ~ Int8 Source

Reads bytes from the underlying byteReader and decodes the result into dest.

Returns Ok(k) to signify that k chars were successfully read and written to dest.

Guarantees that 0 <= k <= length(dest).

Returns Err(e) if some underlying error occurs.

def wrap(rc: Region[rr], charset: CharacterSet, byteReader: t): DecodingReader[t, rr] \ rr + IO Source

Wraps byteReader in a DecodingReader.