Handler

kreuzberg.EventSink.Handler
case class Handler[E](f: (HandlerContext, E) => Unit) extends EventSink[E]

An imperative handler.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait EventSink[E]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

inline def and[T <: E](sink: EventSink[T]): EventSink[T]

Add another sink

Add another sink

Attributes

Inherited from:
EventSink
inline def contraCollect[F](pf: PartialFunction[F, E]): EventSink[F]

Applies a partial function before calling the sink.

Applies a partial function before calling the sink.

Attributes

Inherited from:
EventSink
def contraMap[F](f: F => E): EventSink[F]

Applies a map function before calling a sink.

Applies a map function before calling a sink.

Attributes

Inherited from:
EventSink
inline def preTransform[F, T <: E](transformer: EventTransformer[F, T]): EventSink[F]

Attributes

Inherited from:
EventSink
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def trigger()(using h: HandlerContext, ev: Unit => E): Unit

Like trigger, but for Unit and or Any

Like trigger, but for Unit and or Any

Attributes

Inherited from:
EventSink
def trigger(value: E)(using h: HandlerContext): Unit

Call from an imperative handler

Call from an imperative handler

Attributes

Inherited from:
EventSink