mapper
inline fun <FromKey, FromValue, ToKey, ToValue> mapper(noinline keyFromToTo: suspend FromKey.() -> ToKey = { this as ToKey }, noinline valueFromToTo: suspend FromValue.() -> ToValue = { this as ToValue }, noinline keyToToFrom: suspend ToKey.() -> FromKey = { this as FromKey }, noinline valueToToFrom: suspend ToValue.() -> FromValue = { this as FromValue }): SimpleMapperRepo<FromKey, FromValue, ToKey, ToValue>(source)
Creates a MapperRepo with optional custom conversion functions. By default, uses casting for type conversions.
Parameters
key From To To
Function to convert keys from inner to outer type
value From To To
Function to convert values from inner to outer type
key To To From
Function to convert keys from outer to inner type
value To To From
Function to convert values from outer to inner type