bquarp v0.5.2 Reactivity.DSL.Behaviour View Source
The DSL for distributed reactive programming, specifically, operations applicable to Behaviours.
Link to this section Summary
Functions
Transforms a Behaviour into an Event Stream.
Returns the current value of the Behaviour.
Creates a Behaviour from a plain Observable.
Creates a Behaviour from a Signal Observable, tags it with the given guarantees.
Checks if the given argument is a Behaviour.
Switches from an intial Behaviour to newly supplied Behaviours.
Switches from one Behaviour to another on an event occurrence.
Link to this section Functions
changes(arg) View Source
Transforms a Behaviour into an Event Stream.
evaluate(arg) View Source
Returns the current value of the Behaviour.
from_plain_obs(obs) View Source
Creates a Behaviour from a plain Observable.
Attaches the given Guarantee to it if provided. Otherwise attaches the globally defined Guarantee, which is FIFO (the absence of any Guarantee) by default.
from_plain_obs(obs, g) View Source
from_signal_obs(sobs) View Source
Creates a Behaviour from a Signal Observable, tags it with the given guarantees.
The assumption here is that the contexts of the Observable have already been attached. The primitive can be used for Guarantees with non-obvious contexts (other than e.g. counters) the developer might come up with.
Attaches the given Guarantee to it if provided without changing the context. Otherwise attaches the globally defined Guarantee, which is FIFO (the absence of any Guarantee) by default.
from_signal_obs(sobs, gs) View Source
is_behaviour?(arg1) View Source
Checks if the given argument is a Behaviour.
switch(arg1, arg2) View Source
Switches from an intial Behaviour to newly supplied Behaviours.
Takes an initial Behaviour and a higher-order Event Stream carrying Behaviours. Returns a Behaviour that is at first equal to the initial Behaviour. Each time the Event Stream emits a new Behaviour, the returned Behaviour switches to this new Behaviour.
Requires that all Behaviours have the same set of consistency guarantees.
until(arg1, arg2, arg3) View Source
Switches from one Behaviour to another on an event occurrence.
Takes a two Behaviours and an Event Stream. Returns a Behaviour that is equal to the first Behaviour until the an event occurs, at which point the resulting Behaviour switches to the second Behaviour. The value of the event is not relevant.
Requires that both Behaviours have the same set of consistency guarantees.