proc subscribe[T](self: Observable[T]; subscriber: Subscriber[T]): Subscription
-
proc subscribe[T](self: Subject[T]; subscriber: Subscriber[T]): Subscription
-
proc subscribe[T](self: Observable[T]; onNext: (T) -> void): Subscription
-
proc subscribe[T](self: Observable[T]; onNext: (T) -> void; onCompleted: () -> void): Subscription
-
proc subscribe[T](self: Observable[T]; onNext: (T) -> void;
onCompleted: Option[proc (): void];
onError: Option[proc (i0: Error): void]): Subscription
-
proc subscribe[T](self: Subject[T]; onNext: (T) -> void): Subscription
-
proc behaviorSubject[T](value: T): Subject[T]
-
Creates a behaviorSubject with the initial value of value. Behavior subjects notifies as soon as a subscription is created.
proc create[T](onSubscribe: (Subscriber[T]) -> Subscription): Observable[T]
-
proc create[T](values: seq[T]): Observable[T]
-
proc then[T](first: Observable[T]; second: Observable[T]): Observable[T]
-
proc behaviorSubject[T](source: Observable[T]): Subject[T]
-
Creates a behaviorSubject from another observable. This is useful when one has an observable which one would like to use as a value, exposing the latest value through the subjects .value field.
proc subject[T](): Subject[T]
-
Creates a normal subject, which has no value, and only notifies their subscriber the next time a new value is pushed to it.
proc complete[T](self: Subject[T]): void
-
proc next[T](self: Subject[T]; newVal: T): void
-
Used to push a new value to the subject, causing it to notify all its subscribers/observers.
proc next[T](self: Subject[T]; transformer: (T) -> T): void
-
Used to push a new value to the subject, causing it to notify all its subscribers/observers. This overload is useful if one wants to transform the current value using some mapping function.
proc map[T, R](self: Observable[T]; mapper: (T) -> R): Observable[R]
-
Returns a new Observable which maps values from the source Observable to a new type and value.
proc filter[T](self: Observable[T]; predicate: (T) -> bool): Observable[T]
-
proc combineLatest[A, B, R](a: Observable[A]; b: Observable[B]; mapper: (A, B) -> R): Observable[
R]
-
Combines two observables, pushing both their values through a mapper function that maps to a new Observable type. The new observable triggers when either A or B changes.
proc merge[A](a: Observable[A]; b: Observable[A]): Observable[A]
-
Combines two observables, pushing both their values through a mapper function that maps to a new Observable type. The new observable triggers when either A or B changes.
proc merge[A](observables: Observable[Observable[A]]): Observable[A]
-
Subscribes to each observable as they arrive, emitting their values as they are emitted
proc switch[A](observables: Observable[Observable[A]]): Observable[A]
-
Subscribes to each observable as they arrive after first unsubscribing from the second, emitting their values as they arrive.