streams.types.data

Defines streams for reading and writing primitive data and arrays of primitive values. So-called "data" input and output streams are defined as decorators around an existing "base" stream, so when you read or write on a data stream, it's just performing an analogous operation on its base stream.

Members

Aliases

DataReadResult
alias DataReadResult(T) = Either!(T, "value", StreamError, "error")

The result of a data input stream read operation, which is either a value or an error.

Enums

Endianness
enum Endianness

An enum defining the endianness of a stream, which is how it assumes data on the underlying resource to be written and read, irrespective of the system endianness.

Functions

dataInputStreamFor
DataInputStream!S dataInputStreamFor(S stream, Endianness endianness)

Creates and returns a data input stream that's wrapped around the given byte input stream.

dataOutputStreamFor
DataOutputStream!S dataOutputStreamFor(S stream, Endianness endianness)

Creates and returns a data output stream that's wrapped around the given byte output stream.

Structs

DataInputStream
struct DataInputStream(S)

An input stream that is wrapped around a byte input stream, so that values may be read from the stream as bytes.

DataOutputStream
struct DataOutputStream(S)

An output stream that is wrapped around a byte output stream, so that values may be written to the stream as bytes.

Variables

SYSTEM_ENDIANNESS
Endianness SYSTEM_ENDIANNESS;
Undocumented in source.
SYSTEM_ENDIANNESS
Endianness SYSTEM_ENDIANNESS;
Undocumented in source.

Meta