Map

kreuzberg.EventTransformer.Map
case class Map[I, O](fn: I => O) extends EventTransformer[I, O]

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait EventTransformer[I, O]
class Object
trait Matchable
class Any
Show all

Members list

Type members

Inherited types

final override type WithSink[X] = EventSink[I]

A Sink applied.

A Sink applied.

Attributes

Inherited from:
EventTransformer
final override type WithTransformer[X] = EventTransformer[I, X]

Event Transformer applied.

Event Transformer applied.

Attributes

Inherited from:
EventTransformer

Value members

Inherited methods

inline def changeModel[T >: O, M](model: Model[M])(f: (T, M) => M): WithSink[T]

Shortcut for building event bindings

Shortcut for building event bindings

Attributes

Inherited from:
EventSinkApplicationDsl
inline def changeModelDirect[T >: O, M](model: Model[M])(f: M => M): WithSink[T]

Change model without caring about the value of the event.

Change model without caring about the value of the event.

Attributes

Inherited from:
EventSinkApplicationDsl
inline def collect[F](f: PartialFunction[O, F]): WithTransformer[F]

Attributes

Inherited from:
EventTransformationDsl
inline def doNothing[T >: O]: WithSink[T]

Do nothing (e.g. some events already have an effect just because they are registered, e.g. Drag and Drop events with preventDefault)

Do nothing (e.g. some events already have an effect just because they are registered, e.g. Drag and Drop events with preventDefault)

Attributes

Inherited from:
EventSinkApplicationDsl
inline def effect[F >: O, R](op: F => Effect[R]): WithTransformer[(F, Try[R])]

Add some effect.

Add some effect.

Attributes

Inherited from:
EventTransformationDsl
inline def executeCode[T >: O](f: T => Unit): WithSink[T]

Execute custom Code.

Execute custom Code.

Attributes

Inherited from:
EventSinkApplicationDsl
inline def filter[F >: O](f: F => Boolean): WithTransformer[F]

Attributes

Inherited from:
EventTransformationDsl
inline def future[F >: O, R](op: F => ExecutionContext ?=> Future[R]): WithTransformer[(F, Try[R])]

Add some future.

Add some future.

Attributes

Inherited from:
EventTransformationDsl
inline def handleErrors[F](sink: EventSink[Throwable])(implicit ev: O => Try[F]): WithTransformer[F]

If e is a Try[T], handle errors using another sink.

If e is a Try[T], handle errors using another sink.

Attributes

Inherited from:
EventTransformationDsl
inline def intoModel[T >: O](model: Model[T]): WithSink[T]

Change model without caring about the previous value of the model.

Change model without caring about the previous value of the model.

Attributes

Inherited from:
EventSinkApplicationDsl
inline def intoProperty[T >: O, D <: ScalaJsElement](prop: JsProperty[D, T]): WithSink[T]

Write a value into a property

Write a value into a property

Attributes

Inherited from:
EventSinkApplicationDsl
inline def map[F](f: O => F): WithTransformer[F]

Attributes

Inherited from:
EventTransformationDsl
inline def mapUnit: WithTransformer[Unit]

Throw away any data.

Throw away any data.

Attributes

Inherited from:
EventTransformationDsl
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
inline def recoverWith[F, R](f: Throwable => F)(implicit ev: O => Try[F]): WithTransformer[F]

Recover a Try-Event source into something useful.

Recover a Try-Event source into something useful.

Attributes

Inherited from:
EventTransformationDsl
inline def recoverWith2[A, F, R](f: Throwable => F)(implicit ev: O => (A, Try[F])): WithTransformer[(A, F)]

Recovers the most right part of a pair.

Recovers the most right part of a pair.

Attributes

Inherited from:
EventTransformationDsl
inline def second[F >: O, A, B](using ev: F => (A, B)): WithTransformer[B]

Take the second value of a Pair.

Take the second value of a Pair.

Attributes

Inherited from:
EventTransformationDsl
inline def setModelTo[T >: O, M](model: Model[M], value: M): WithSink[T]

Set the model to a value without caring about the value of the event or model before

Set the model to a value without caring about the value of the event or model before

Attributes

Inherited from:
EventSinkApplicationDsl
inline def state[F >: O, S](from: RuntimeState[S]): WithTransformer[(F, S)]

Add some runtime state.

Add some runtime state.

Attributes

Inherited from:
EventTransformationDsl
inline def tap[T >: O](fn: T => Unit): WithTransformer[T]

Execute code while traversing the source.

Execute code while traversing the source.

Attributes

Inherited from:
EventTransformationDsl
override def to[T >: O](sink: EventSink[T]): EventSink[I]

Connect this source to a sink

Connect this source to a sink

Attributes

Definition Classes
Inherited from:
EventTransformer
inline def transform[R](f: (EventTransformer[I, O]) => R): R

Transform via function.

Transform via function.

Attributes

Inherited from:
EventTransformer
inline def trigger[T >: O](channel: Channel[T]): WithSink[T]

Trigger some channel.

Trigger some channel.

Attributes

Inherited from:
EventSinkApplicationDsl
def viaSink(sink: EventSink[O]): EventTransformer[I, O]

Attributes

Inherited from:
EventTransformer
inline def withEffect[F >: O, R](op: F => Effect[R]): WithTransformer[Try[R]]

Replace with effect data.

Replace with effect data.

Attributes

Inherited from:
EventTransformationDsl
inline def withFuture[F >: O, R](op: F => ExecutionContext ?=> Future[R]): WithTransformer[Try[R]]

Replace with future result.

Replace with future result.

Attributes

Inherited from:
EventTransformationDsl
inline def withState[S](from: RuntimeState[S]): WithTransformer[S]

Replace with runtime state.

Replace with runtime state.

Attributes

Inherited from:
EventTransformationDsl
override def withTransformer[Q](transformer: EventTransformer[O, Q]): EventTransformer[I, Q]

Transforms using a Transformer.

Transforms using a Transformer.

Attributes

Definition Classes
Inherited from:
EventTransformer