Array.reader

Read directly from this buffer.

class Array
final
size_t
reader
(
scope size_t delegate
(
const(void)[]
)
dg
)

Parameters

dg size_t delegate
(
const(void)[]
)

Callback to provide buffer access to.

Return Value

Type: size_t

Returns whatever the delegate returns.

Remarks: Exposes the raw data buffer at the current _read position. The delegate is provided with a void[] representing the available data, and should return zero to leave the current _read position intact.

If the delegate consumes data, it should return the number of bytes consumed; or IConduit.Eof to indicate an error.

Meta