Observer
class¶
Bases: ABC
, Generic[_InT]
A base class that defines the workflow and essential protocols for responding to notifications from an observable.
Notes:
- This class is parameterized by the type of value that will be received in the
next
method.
Source code in pyventus/reactive/observers/observer.py
Functions¶
next
abstractmethod
async
¶
Handle the next value emitted by the observable.
PARAMETER | DESCRIPTION |
---|---|
value
|
The value emitted by the observable.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
None
|
None. |
error
abstractmethod
async
¶
Handle an error that occurs in the observable.
PARAMETER | DESCRIPTION |
---|---|
exception
|
The exception that was raised by the observable.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
None
|
None. |