pipe - multiple declarations
- Function pipe
- Function pipe
Function pipe
Start building a new pipeline, adding Stage
as its source stage.
If Stage
is an active source, the type of its sink is not known at this point and therefore it is not
constructed immediately. Instead, args
are saved and will be used to construct
Stage!Sink
as
soon as type of Sink
is known.
Prototype
auto pipe(alias Stage, Args...)(
auto ref Args args
)
if (!isSink!Stage && isSource!Stage);
Parameters
Name | Description |
---|---|
Stage | source to be added as first stage of the new pipeline. |
args | arguments passed to Stage constructor. |
Function pipe
Append Stage
to
.
pipeline
Prototype
auto pipe(alias Stage, Pipeline, Args...)(
auto ref Pipeline pipeline,
auto ref Args args
)
if (isPipeline!Pipeline && isSink!Stage);
Parameters
Name | Description |
---|---|
Stage | a struct or class template parameterized by its source type. Stage will be
instantiated with Pipeline as template argument. Stage constructor
must accept the following order of arguments: (pipeline, args) . |
pipeline | a pipeline ending with a passive (peek/consume or pull) source. |
args | additional arguments to Stage constructor. |
Returns
Stage!Pipeline(pipeline, args)
.
pipeline
is moved if non-copyable.
Authors
Copyright
© 2016 Adrian Matoga