fold

inline fun <T, R> DecodedObservation<T>.fold(onValue: (T) -> R, onDisconnected: () -> R): R

Eliminate a DecodedObservation by applying the matching function.