mapToCache

inline fun <In : Out, Out : Any> Fetch<In>.mapToCache(transform: Finished<In>.() -> Out? = Finished<In>::result): Fetch<Out>

Transforms Finished.result into Fetching.cache.

If In != Out, then Out = the closest common ancestor of In and Out.

Receiver

The Fetch to transform.

Return

The maybe transformed Fetch, now of type Out.

Parameters

In

The type of the Fetch value.

Out

The type of the transformed value.

transform

The lambda to transform the Finished state.