ToBuilder

class ToBuilder[A, Out](builder: ReusableBuilder[A, Out]) extends BoundHandler[A]

A BoundHandler that adds all inputs to the given builder, always returning the Continue signal. Use the take() method to obtain the builder's result and clear the builder.

Type parameters:
A

The input event type

Out

The builder's result type

Value parameters:
builder

A ReusableBuilder used as a buffer for inputs received by this handler

trait BoundHandler[A]
trait HandlerWrite[A]
class Object
trait Matchable
class Any

Value members

Concrete methods

def finish(): Unit
def push(out: A): Signal
def take(): Out

Finish the builder by calling its result() method, then clear the builder so that subsequent calls to push will accumulate a new output.

Finish the builder by calling its result() method, then clear the builder so that subsequent calls to push will accumulate a new output.

Returns:

The builder's result before it gets cleared

Inherited methods

def pushMany(outs: Iterator[A]): Signal

Convenience for calling push multiple times, aborting early if the signal becomes Stop in response to any one push.

Convenience for calling push multiple times, aborting early if the signal becomes Stop in response to any one push.

Value parameters:
outs

An iterator of outputs from the upstream handler, to be pushed into this handler

Returns:

A "signal" indicating whether this handler wants to continue receiving inputs afterward

Inherited from:
HandlerWrite