UPickleProductTranslation

trait UPickleProductTranslation extends BiMapProductTranslation[ReadWriter, Value, ListMap[String, Value]]
Companion
object
trait BiMapProductTranslation[ReadWriter, Value, ListMap[String, Value]]
class Object
trait Matchable
class Any

Type members

Inherited classlikes

trait BiMapExtractor[T]()
trait BiMapInjector[T]()
trait BiMapTupleExtractor[R <: Tuple]()
trait BiMapTupleInjector[RV <: Tuple, R <: Tuple]()

Inherited types

type Ctx[X] = TranslatedFieldDescription[X, OtherSchema]
Inherited from
BiMapProductTranslation

Value members

Concrete methods

override
def buildMapVal(buildableValue: ListMap[String, Value]): Value

Construct the final type to be bimapped to and from

Construct the final type to be bimapped to and from

Definition Classes
BiMapProductTranslation
override
def extractAdditionalFields[T](from: Value, informedBy: ReadWriter[T]): Map[String, T]
Definition Classes
BiMapProductTranslation
override
def extractField[T](from: Value, using: TranslatedFieldDescription[T, ReadWriter]): T
Definition Classes
BiMapProductTranslation
override
def initMapVal: ListMap[String, Value]

Initial empty value for the type being mapped to and from, that can be built by adding field values. For instance, if the value type is Map[ String, T ], initMapVal would be Map.empty[ String, T ]

Initial empty value for the type being mapped to and from, that can be built by adding field values. For instance, if the value type is Map[ String, T ], initMapVal would be Map.empty[ String, T ]

Returns

initial value of buildable bimap type

Definition Classes
BiMapProductTranslation
override
def schemaFromBimap[T](to: T => Value, from: Value => T): ReadWriter[T]

Construct a schema from the two parts of a bimap.

Construct a schema from the two parts of a bimap.

Type Params
T

type being read/written

Value Params
from

MapVal => T : reader

to

T => MapVal : writer

Returns

type class instance for some reader/writer

Definition Classes
BiMapProductTranslation
override
def writeAdditionalFields[T](from: Map[String, T], to: ListMap[String, Value], informedBy: ReadWriter[T]): ListMap[String, Value]
Definition Classes
BiMapProductTranslation
override
def writeField[T](value: T, to: ListMap[String, Value], informedBy: TranslatedFieldDescription[T, ReadWriter]): ListMap[String, Value]
Definition Classes
BiMapProductTranslation

Inherited methods

def translate[T, Rt <: Tuple, RVt <: Tuple, FDL <: Tuple, AFt, AFSt, C, DC](schema: Aux[T, ProductShape[T, Rt, RVt, AFt, AFSt, C, DC]])(using tr: SchemaTranslator[T, ProductShape[T, Rt, RVt, AFt, AFSt, C, DC], ReadWriter]): ReadWriter[T]
Inherited from
BiMapProductTranslation

Givens

Inherited givens

given additionalFieldsExtractor: Aux[MapVal, OtherSchema[T], Map[String, T]]
Inherited from
BiMapProductTranslation
given additionalFieldsInjector: Aux[Map[String, T], BuildMapVal, OtherSchema[T], BuildMapVal]
Inherited from
BiMapProductTranslation
Inherited from
BiMapProductTranslation
given decoderWithAF[T, Rt <: Tuple, RVt <: Tuple, AFt, AFSt, C, DC](using val ex: Aux[Rt, RVt], val afExtractor: Aux[MapVal, OtherSchema[AFt], Map[String, AFt]], val afTranslator: SchemaTranslator[AFt, AFSt, OtherSchema], val prodConstr: ProductConstructor[C, RVt, AFt, T]): Decoder[T, ProductShape[T, Rt, RVt, AFt, AFSt, C, DC], MapVal]
given decoderWithoutAF[T, Rt <: Tuple, RVt <: Tuple, C, DC](using val ex: Aux[Rt, RVt], val prodConstr: ProductConstructor[C, RVt, Nothing, T]): Decoder[T, ProductShape[T, Rt, RVt, Nothing, Unit, C, DC], MapVal]
given encoderWithAF[T, Rt <: Tuple, RVt <: Tuple, FDL <: Tuple, AFt, AFSt, C, DC](using val ctx: CtxWrapTuplesConstraint[Ctx, FDL, RVt], val inj: BiMapTupleInjector[RVt, Rt], val afInjector: Aux[Map[String, AFt], BuildMapVal, OtherSchema[AFt], BuildMapVal], val afTranslator: SchemaTranslator[AFt, AFSt, OtherSchema], val prodDeconstr: ProductDeconstructor[DC, RVt, AFt, T]): Encoder[T, ProductShape[T, Rt, RVt, AFt, AFSt, C, DC], MapVal]
given encoderWithoutAF[T, Rt <: Tuple, RVt <: Tuple, FDL <: Tuple, C, DC](using val ctx: CtxWrapTuplesConstraint[Ctx, FDL, RVt], val inj: BiMapTupleInjector[RVt, Rt], val prodDeconstr: ProductDeconstructor[DC, RVt, Nothing, T]): Encoder[T, ProductShape[T, Rt, RVt, Nothing, Unit, C, DC], MapVal]
Inherited from
BiMapProductTranslation