Schema.pipe

Appends stage to this schema.

struct Schema(DriveMode mode, S...)
pipe
(
alias NextStage
NextArgs...
)
(
auto ref NextArgs nextArgs
)
if (
isStage!NextStage
)

Parameters

NextStage

Stage to be appended

NextArgs

Arguments to be passed to NextStage constructor when the pipeline is instantiated.

Return Value

Type: auto

The returned value depends on NextStage and the first (source) stage.

  • If NextStage is a filter, a Schema is returned that allows appending further stages to it.
  • If NextStage is an active sink that implements input range interface, the pipeline is instantiated as a reference-counted struct object that also exposes the input range interface.
  • If NextStage is a sink and the first stage is an active source that implements output range interfaece, the pipeline is instantiated as a reference-counted struct object that also exposes the output range interface.
  • If neither first stage nor NextStage have range interface, the pipeline is instantiated on the stack and and executed immediately.
  • It is an error if both first stage and NextStage have range interfaces.

See Also

.pipe, flod.traits.filter, flod.traits.sink;

Meta