Incomplete

sealed interface Incomplete

Marks any AsyncResult that hasn't yet delivered a result (Success or Error). Useful to bundle NotStarted and Loading states in exhaustive when statements.

Inheritors

Functions

Link copied to clipboard
inline fun <T> Incomplete.cast(): AsyncResult<T>

Converts Loading and NotStarted to a AsyncResult of type T. This is to prevent us to having to map everything when we know we don't have a Success value, where types would actually matter.