Extend a pipe until it has a minimum number of elements. If the minimum elements are already present, does nothing.
size_t ensureElems(Chain) (
ref Chain chain,
size_t elems = size_t
This is useful if you need a certain number of elements in the pipe before you can process any more data.
|chain||The pipe to work on.|
|elems||The number of elements to ensure are in the window. If omitted, all elements are extended.|
The resulting number of elements in the window. This may be less than the requested elements if the pipe ran out of data.