Source.asSourceWithContext

Turns a Source into a SourceWithContext which can propagate a context per element along a stream.

Source operators

Signature

def asSourceWithContext[Ctx](f: Out => Ctx): SourceWithContext[Out, Ctx, Mat]

Description

Turns a Source into a SourceWithContext which can propagate a context per element along a stream. The function passed into asSourceWithContext must turn elements into contexts, one context for every element.

Found an error in this documentation? The source code for this page can be found here. Please feel free to edit and contribute a pull request.