ChannelState

ox.channels.ChannelState
trait ChannelState

Allows querying the channel for its closed status.

A channel can be closed in two ways:

  • using Sink.done, indicating that no more elements will be sent
  • using Sink.error, indicating an error

Attributes

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

Members list

Value members

Abstract methods

protected def delegate: CloseableChannel

Concrete methods

def isClosed: Boolean

Attributes

Returns

true if the channel is closed using Sink.done or Sink.error.

Attributes

Returns

Some, with details on why the channel is closed (using Sink.done or Sink.error), or None if the channel is not closed.

def isDone: Boolean

Attributes

Returns

true if the channel is closed using Sink.done. false if it's not closed, or closed with an error.

def isError: Boolean

Attributes

Returns

true if the channel is closed using Sink.error. false if it's not closed, or is done.

def isErrorDetail: Option[Error]

Attributes

Returns

Some, with details on the channel's error (provided using Sink.error), or None if the channel is not closed or is done.