Labeled Observable
Rocket.labeled
— Functionlabeled(names::Val, stream)
Creation operator for the LabeledObservable
that wraps given stream
, that produces Tuple
values into a NamedTuple
with given names
.
Arguments
names
: aVal
object that contains a tuple of symbolsstream
: an observable that emits aTuple
, length of theTuple
events must be equal to the length of thenames
argument
Examples
using Rocket
source = labeled(Val((:x, :y)), from([ (1, 2), (2, 3), (3, 4) ]))
subscribe!(source, logger())
;
# output
[LogActor] Data: (x = 1, y = 2)
[LogActor] Data: (x = 2, y = 3)
[LogActor] Data: (x = 3, y = 4)
[LogActor] Completed
See also: ScheduledSubscribable
, subscribe!
, from
Rocket.LabeledObservable
— TypeLabeledObservable{D, S}()
An Observable that emits NamesTuple
items from a source Observable
that emits Tuple
items.
See also: Subscribable
, labeled