Single Observable

Rocket.ofFunction
of(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

source
Rocket.SingleObservableType
SingleObservable{D, H}(value::D, scheduler::H)

SingleObservable wraps single value of type D into a observable.

Constructor arguments

  • value: a single value to emit
  • scheduler: scheduler-like object

See also: of, Subscribable

source