DoxigAlpha

Reader

Memoizes key information about a file handle such as:

  • The size from calling stat, or the error that occurred therein.
  • The current seek position.
  • The error that occurred when trying to seek.
  • Whether reading should be done positionally or streaming.
  • Whether reading should be done via fd-to-fd syscalls (e.g. sendfile) versus plain variants (e.g. read).

Fulfills the std.Io.Reader interface.

Fields of this type

Fields

#
err:?ReadError
= null
mode:Reader.Mode
= .positional
pos:u64
Tracks the true seek position in the file.
size:?u64
= null
size_err:?SizeError
= null
seek_err:?Reader.SeekError
= null
interface:std.Io.Reader

Type definitions in this namespace

Types

#

Functions in this namespace

Functions

#
initStreaming
Positional is more threadsafe, since the global seek position is not

Error sets in this namespace

Error Sets

#