MapperRepo

Interface for repositories that provide bidirectional mapping between two sets of key-value types. This is useful for adapting repositories to work with different key and value types.

Type Parameters

FromKey

The original key type (inner/source)

FromValue

The original value type (inner/source)

ToKey

The target key type (outer/destination)

ToValue

The target value type (outer/destination)

Inheritors

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Provides a mapper for converting keys between inner and outer types.

Link copied to clipboard

Provides a mapper for converting values between inner and outer types.

Functions

Link copied to clipboard
open suspend fun ToKey.toInnerKey(): FromKey

Converts a key from the outer type to the inner type.

Link copied to clipboard
open suspend fun ToValue.toInnerValue(): FromValue

Converts a value from the outer type to the inner type.

Link copied to clipboard
open suspend fun FromKey.toOutKey(): ToKey

Converts a key from the inner type to the outer type.

Link copied to clipboard
open suspend fun FromValue.toOutValue(): ToValue

Converts a value from the inner type to the outer type.