fold
inline fun <Data : Any, Output> Fetch<Data>.fold(prefetch: Prefetch.() -> Output, fetching: Fetching<Data>.() -> Output, finished: Finished<Data>.() -> Output): Output
Transform all Fetch status into the Output type.
Fold can be used to map
or flatMap
all Fetch variants, but it also can output any type.
Receiver
The Fetch to fold.
Return
The folded value, of type Output.