The single trait

A single trait will only emit either a single next event containing an element, or it will emit an error event containing an error. It will not replay its single emitted error or next event to new subscribers. We can convert a raw Observable sequence to single by calling asSingle() on it. There are a number of places where you might use a single, such as retrieving data from local disk or from a networking operation. They will either deliver the data that is expected or fail with an error.