AddState

kreuzberg.EventTransformer.AddState
case class AddState[I, S](runtimeState: RuntimeState[S]) extends EventTransformer[I, (I, S)]

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait EventTransformer[I, (I, S)]
trait EventTransformable[(I, S)]
trait EventSinkApplicationDsl[(I, S)]
trait EventTransformationDsl[(I, S)]
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 >: (I, S), 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 >: (I, S), 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[(I, S), F]): WithTransformer[F]

Attributes

Inherited from:
EventTransformationDsl
inline def doNothing[T >: (I, S)]: 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 >: (I, S), R](op: F => Effect[R]): WithTransformer[(F, Try[R])]

Add some effect.

Add some effect.

Attributes

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

Execute custom Code.

Execute custom Code.

Attributes

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

Attributes

Inherited from:
EventTransformationDsl
inline def future[F >: (I, S), 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: ((I, S)) => 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 >: (I, S)](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 >: (I, S), 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: ((I, S)) => 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: ((I, S)) => 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: ((I, S)) => (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 >: (I, S), 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 >: (I, S), 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 >: (I, S), S](from: RuntimeState[S]): WithTransformer[(F, S)]

Add some runtime state.

Add some runtime state.

Attributes

Inherited from:
EventTransformationDsl
inline def tap[T >: (I, S)](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 >: (I, S)](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, (I, S)]) => R): R

Transform via function.

Transform via function.

Attributes

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

Trigger some channel.

Trigger some channel.

Attributes

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

Attributes

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

Replace with effect data.

Replace with effect data.

Attributes

Inherited from:
EventTransformationDsl
inline def withFuture[F >: (I, S), 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[(I, S), Q]): EventTransformer[I, Q]

Transforms using a Transformer.

Transforms using a Transformer.

Attributes

Definition Classes
Inherited from:
EventTransformer