Represents an object that is both an observable sequence as well as an observer. Each notification is broadcasted to all subscribed observers.
Creates an observable sequence object from the specified subscription function.
subscribe – [Optional] Subscription function
Notifies all subscribed observers with the value.
value (TypeVar
(_T
)) – The value to send to all subscribed observers.
None
Notifies all subscribed observers with the exception.
error (Exception
) – The exception to send to all subscribed observers.
None
Notifies all subscribed observers of the end of the sequence.
None
Unsubscribe all observers and release resources.
None
Represents a value that changes over time. Observers can subscribe to the subject to receive the last (or initial) value and all subsequent notifications.
Initializes a new instance of the BehaviorSubject class which creates a subject that caches its last value and starts with the specified value.
value (TypeVar
(_T
)) – Initial value sent to observers when no other value has been
received by the subject yet.
Release all resources.
Releases all resources used by the current instance of the BehaviorSubject class and unsubscribe all observers.
None
Represents an object that is both an observable sequence as well as an observer. Each notification is broadcasted to all subscribed and future observers, subject to buffer trimming policies.
Initializes a new instance of the ReplaySubject class with the specified buffer size, window and scheduler.
buffer_size (Optional
[int
]) – [Optional] Maximum element count of the replay
buffer.
[Optional] (window) – Maximum time length of the replay buffer.
scheduler (Optional
[SchedulerBase
]) – [Optional] Scheduler the observers are invoked on.
Releases all resources used by the current instance of the ReplaySubject class and unsubscribe all observers.
None
Represents the result of an asynchronous operation. The last value before the close notification, or the error received through on_error, is sent to all subscribed observers.
Creates a subject that can only receive one value and that value is cached for all future observations.
Unsubscribe all observers and release resources.
None