MapSource

kreuzberg.EventSource$.MapSource
case class MapSource[E, F](from: EventSource[E], fn: E => F) extends EventSource[F]

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait EventSource[F]
trait EventSourceDsl[F]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def changeModel[T >: F, M](model: Model[M])(f: (T, M) => M): SourceSink[T]

Shortcut for building event bindings

Shortcut for building event bindings

Attributes

Inherited from:
EventSourceActions
def changeModelDirect[T >: F, M](model: Model[M])(f: M => M): SourceSink[T]

Change model without caring about the value of the event.

Change model without caring about the value of the event.

Attributes

Inherited from:
EventSourceActions
def collect[F](f: PartialFunction[F, F]): EventSource[F]

Attributes

Inherited from:
EventSourceDslModifiers
def doNothing[T >: F]: SourceSink[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:
EventSourceActions
inline def effect[T >: F, R](op: T => Effect[R]): EventSource[(T, Try[R])]

Add some effect.

Add some effect.

Attributes

Inherited from:
EventSourceDslModifiers
def executeCode[T >: F](f: T => Unit): SourceSink[T]

Execute custom Code.

Execute custom Code.

Attributes

Inherited from:
EventSourceActions
def filter(f: F => Boolean): EventSource[E]

Attributes

Inherited from:
EventSourceDslModifiers
inline def future[T >: F, R](op: T => Future[R]): EventSource[(T, Try[R])]

Add some future.

Add some future.

Attributes

Inherited from:
EventSourceDslModifiers
def handleErrors[F](sink: EventSink[Throwable])(implicit ev: F => Try[F]): EventSource[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:
EventSourceDslModifiers
def intoModel[T >: F](model: Model[T]): SourceSink[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:
EventSourceActions
def intoModel[T >: F, M](model: Model[M])(f: T => M): SourceSink[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:
EventSourceActions
def intoProperty[T >: F, D <: ScalaJsElement](prop: JsProperty[D, T]): SourceSink[T]

Write a value into a property

Write a value into a property

Attributes

Inherited from:
EventSourceActions
def map[F](f: F => F): EventSource[F]

Attributes

Inherited from:
EventSourceDslModifiers
inline def mapUnit: EventSource[Unit]

Throw away any data.

Throw away any data.

Attributes

Inherited from:
EventSourceDslModifiers
def or[T >: F](source: EventSource[T]): EventSource[T]

Combine with some other event source.

Combine with some other event source.

Attributes

Inherited from:
EventSourceActions
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

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

Recover a Try-Event source into something useful.

Recover a Try-Event source into something useful.

Attributes

Inherited from:
EventSourceDslModifiers
def recoverWith2[A, T, R](f: Throwable => T)(implicit ev: F => (A, Try[T])): EventSource[(A, T)]

Recovers the most right part of a pair.

Recovers the most right part of a pair.

Attributes

Inherited from:
EventSourceDslModifiers
inline def second[T >: F, A, B](using ev: T => (A, B)): EventSource[B]

Take the second value of a Pair.

Take the second value of a Pair.

Attributes

Inherited from:
EventSourceDslModifiers
def setModel[T >: F, M](model: Model[M], value: M): SourceSink[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:
EventSourceActions
inline def state[S](from: RuntimeState[S]): EventSource[(E, S)]

Add some runtime state.

Add some runtime state.

Attributes

Inherited from:
EventSourceDslModifiers
def tap[T >: F](fn: T => Unit): EventSource[T]

Execute code while traversing the source.

Execute code while traversing the source.

Attributes

Inherited from:
EventSourceActions
def to[T >: F](sink: EventSink[T]): SourceSink[T]

Connect this source to a sink

Connect this source to a sink

Attributes

Inherited from:
EventSourceActions
def transform[F, R](f: EventSource[F] => R): R

Transform via function.

Transform via function.

Attributes

Inherited from:
EventSourceDslModifiers
def trigger[T >: F](channel: Channel[T]): SourceSink[T]

Trigger some channel.

Trigger some channel.

Attributes

Inherited from:
EventSourceActions
inline def withEffect[T >: F, R](op: T => Effect[R]): EventSource[Try[R]]

Replace with effect data.

Replace with effect data.

Attributes

Inherited from:
EventSourceDslModifiers
inline def withFuture[T >: F, R](op: T => Future[R]): EventSource[Try[R]]

Replace with future result.

Replace with future result.

Attributes

Inherited from:
EventSourceDslModifiers
inline def withState[S](from: RuntimeState[S]): EventSource[S]

Replace with runtime state.

Replace with runtime state.

Attributes

Inherited from:
EventSourceDslModifiers