Function iosrc

Create an input source from a given Chain, and a given translation function/template.

auto iosrc(alias fun, Chain) (
  Chain c
);

It is advisable to use a template or lambda that does not require a closure, and is not a delegate from a struct that might move.

The result is also alias-this'd to the chain, so it can be used as an iopipe also.

Parameters

NameDescription
fun Function that accepts as its first parameter the input chain (of type Chain), and as its second parameter, the buffer to read into. Only buffer types that are supported are used.
c The chain to read from