The ignore_elements operator emits no items. This operator completes when its source observable completes. The following figure shows the marble diagram of this operator:
Figure 9.8: The ignore_elements operator
The prototype of this operator is the following:
Observable.ignore_elements(self)
Here is an example of this operator:
numbers = Observable.from_([1, 2, 3, 4, 5, 6])
numbers.ignore_elements().subscribe(
on_next = lambda i: print("on_next {}".format(i)),
on_error = lambda e: print("on_error: {}".format(e)),
on_completed = lambda: print("on_completed")
)
This gives the following result: