bquarp v0.3.0 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.

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

Transforms a Behaviour into an Event Stream.

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.

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.

Link to this function

from_signal_obs(sobs, gs) View Source

Checks if the given argument is a Behaviour.

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.

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.