mapFetchingToFinished

inline fun <T : Any> Fetch<T>.mapFetchingToFinished(transform: () -> T): Fetch<T>

Transform a fetching fetch state to finished.

Because finished is not mapped, this function cannot update the type, T (i.e. the result of transform must be of the same type as the Fetch caller)!

Receiver

The Fetch to transform.

Return

The transformed Fetch of type T.

Parameters

T

The type of the Fetch value.

transform

The lambda to transform the fetching state into a finished.