valueOrThrow

inline fun <T> Event<T>.valueOrThrow(): T(source)

Returns the encapsulated value if this Event is a Event.Value. If this is Event.Error, throws the encapsulated error. Otherwise, throws a NoSuchElementException.