writeTo

abstract fun writeTo(writer: <Error class: unknown class>)(source)

Writes the entire pipeline into writer.

This function is similar to BsonNode.writeTo, with the difference that expressions generate documents, and pipelines generate arrays.

Using this method will thus write an array containing the different stages.