aiq.utils.reactive.base.subject_base#
Attributes#
Classes#
Minimal interface we expect from the Subject for unsubscribing logic. |
Module Contents#
- T#
- OnNext#
- OnError#
- OnComplete#
- class SubjectBase#
Bases:
aiq.utils.reactive.base.observer_base.ObserverBase
[T
],aiq.utils.reactive.base.observable_base.ObservableBase
[T
]Minimal interface we expect from the Subject for unsubscribing logic.
- abstractmethod subscribe(
- on_next: aiq.utils.reactive.base.observer_base.ObserverBase[T] | OnNext[T] | None = None,
- on_error: OnError | None = None,
- on_complete: OnComplete | None = None,
Subscribes an Observer or callbacks to this Observable.
If an Observer is provided, it will be subscribed to this Observable. If callbacks are provided, they will be wrapped into an Observer and subscribed to this Observable.
- abstractmethod on_next(value: T) None #
Called when a new item is produced. If the observer is stopped, this call should be ignored or raise an error.