Requests

com.alecdorrington.laminarcomponents.Requests
object Requests

Requests made from event handlers, each followed only until it answers.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Requests.type

Members list

Type members

Classlikes

final class Serial[K, V](send: (K, V) => EventStream[Unit])

Fires each key's changes one at a time, so that two quick changes never apply out of order. One made while its key is in flight waits, replacing any already waiting, as only the latest matters.

Fires each key's changes one at a time, so that two quick changes never apply out of order. One made while its key is in flight waits, replacing any already waiting, as only the latest matters.

Type parameters

K

What a change is to.

V

A change.

Value parameters

send

The request making a change, emitting once when answered.

Attributes

Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

def fire[X](request: EventStream[X])(handle: X => Unit = ...): Unit

Runs a request from a handler, releasing its subscription once it answers.

Runs a request from a handler, releasing its subscription once it answers.

Always write the second argument list, even empty: fire(request)(). A bare fire(request) is a function awaiting its handler; discarded, it compiles silently and sends nothing.

Type parameters

X

The answer.

Value parameters

handle

The handler of its answer.

request

The request, sent when followed, emitting its answer once.

Attributes