readOne

Reads exactly one element from an input stream.

Either!(T, "element", StreamError, "error")
readOne
(
S
T = StreamType!S
)
(
ref S stream
)

Parameters

stream S

The stream to read one element from.

Return Value

Type: Either!(T, "element", StreamError, "error")

Either the element, or an error.

Meta