Single Observable
Rocket.of
— Functionof(x; scheduler::H = AsapScheduler()) where { H <: AbstractScheduler }
Creation operator for the SingleObservable
that emits a single value x and then completes.
Arguments
x
: value to be emmited before completion
Examples
using Rocket
source = of(1)
subscribe!(source, logger())
;
# output
[LogActor] Data: 1
[LogActor] Completed
See also: SingleObservable
, subscribe!
, logger
Rocket.SingleObservable
— TypeSingleObservable{D, H}(value::D, scheduler::H)
SingleObservable wraps single value of type D
into a observable.
Constructor arguments
value
: a single value to emitscheduler
: scheduler-like object
See also: of
, Subscribable