SourceDrainOps

ox.channels.SourceDrainOps
trait SourceDrainOps[+T]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Source[T]
class Channel[T]
Self type
Source[T]

Members list

Value members

Concrete methods

def drain(): Unit

Receives all values from the channel. Blocks until the channel is done.

Receives all values from the channel. Blocks until the channel is done.

Attributes

Throws
ChannelClosedException.Error

when there is an upstream error.

def drainOrError(): Unit | Error

The "safe" variant of drain.

The "safe" variant of drain.

Attributes

def foreach(f: T => Unit): Unit

Invokes the given function for each received value. Blocks until the channel is done.

Invokes the given function for each received value. Blocks until the channel is done.

Attributes

Throws
ChannelClosedException.Error

When there is an upstream error.

def foreachOrError(f: T => Unit): Unit | Error

The "safe" variant of foreach.

The "safe" variant of foreach.

Attributes

def pipeTo(sink: Sink[T], propagateDone: Boolean): Unit

Passes each received values from this channel to the given sink. Blocks until the channel is done.

Passes each received values from this channel to the given sink. Blocks until the channel is done.

Errors are always propagated. Successful channel completion is propagated when propagateDone is set to true.

Attributes

def toList: List[T]

Accumulates all values received from the channel into a list. Blocks until the channel is done.

Accumulates all values received from the channel into a list. Blocks until the channel is done.

Attributes

Throws
ChannelClosedException.Error

When there is an upstream error.

def toListOrError: List[T] | Error

The "safe" variant of toList.

The "safe" variant of toList.

Attributes