A return type to use when a mapping function could encounter an error. Mapping streams have a special case to treat this return type.
Creates a mapping input stream that applies the function f to all elements read from the stream.
Creates a mapping output stream that applies the function f to all elements written to the stream.
An input stream that wraps another stream, and applies a function to each element read from that stream.
An output stream that applies a function to each element that's written to it before writing to the underlying stream.
This module defines "mapping" input and output streams, which map elements of a wrapped stream to another type. For example, a mapping input stream could wrap around an input stream of strings, and parse each one as an int.
Mapping streams generally operate using a templated function alias; that is, you provide a function at compile-time, and a stream on which to operate. The mapping function should take a single argument, and produce a result of any type. However, if your function returns a MapResult type (as defined in this module), the mapping streams will acknowledge any stream errors that occur.