Observer protocol
Defines the functions for providing a new value, to signal an error and to signal the completion of the observed calculation.
Calls to the observer follow the regular sequence
on_next* (on_error | on_completed)?
It is the taks of on_error
and on_completed
to free up
all internal resources. In particular the subscription needs
to be closed. This can be done by calling unsubscribe
.
Summary
on_completed(observer, observable) | |
on_error(observer, exception) | |
on_next(observer, value) |
Types
t :: term
Functions
Specs:
- on_completed(Observer.t, Observable.t) :: :ok
Specs:
- on_error(Observer.t, any) :: :ok
Specs:
- on_next(Observer.t, any) :: :ok