TransformerDefinitionForAll

io.scalaland.chimney.dsl.TransformerDefinitionForAll
final class TransformerDefinitionForAll[From, To, Overrides <: TransformerOverrides, Flags <: TransformerFlags, FromMatch, ToMatch](val runtimeData: RuntimeDataStore) extends WithRuntimeDataStore

Scoped builder for defining overrides that apply to all matching [FromMatch, ToMatch] derivations.

Type parameters

Flags

type-level encoded flags

From

type of top-level input value

FromMatch

source type to match in recursive derivations

Overrides

type-level encoded config

To

type of top-level output value

ToMatch

target type to match in recursive derivations

Attributes

Since

1.10.0

Graph
Supertypes
trait WithRuntimeDataStore
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

transparent inline def withFieldComputed[T, U](inline selector: ToMatch => T, inline f: FromMatch => U)(using U <:< T): TransformerDefinition[From, To, _ <: TransformerOverrides, Flags]

Use the function f to compute the value of the field picked using selector.

Use the function f to compute the value of the field picked using selector.

Attributes

Since

1.10.0

transparent inline def withFieldComputedPartial[T, U](inline selector: ToMatch => T, inline f: FromMatch => Result[U])(using U <:< T): TransformerDefinition[From, To, _ <: TransformerOverrides, Flags]

Use the function f to compute the partial result for the field picked using selector.

Use the function f to compute the partial result for the field picked using selector.

Attributes

Since

1.10.0

transparent inline def withFieldConst[T, U](inline selector: ToMatch => T, inline value: U)(using U <:< T): TransformerDefinition[From, To, _ <: TransformerOverrides, Flags]

Use the value provided here for the field picked using selector.

Use the value provided here for the field picked using selector.

Attributes

Since

1.10.0

transparent inline def withFieldRenamed[T, U](inline selectorFrom: FromMatch => T, inline selectorTo: ToMatch => U): TransformerDefinition[From, To, _ <: TransformerOverrides, Flags]

Use the selectorFrom field in FromMatch to obtain the value of the selectorTo field in ToMatch.

Use the selectorFrom field in FromMatch to obtain the value of the selectorTo field in ToMatch.

Attributes

Since

1.10.0

Concrete fields