io.scalaland.chimney.dsl

Members list

Type members

Classlikes

final class CodecDefinition[Domain, Dto, EncodeOverrides <: TransformerOverrides, DecodeOverrides <: TransformerOverrides, Flags <: TransformerFlags](val encode: TransformerDefinition[Domain, Dto, EncodeOverrides, Flags], val decode: PartialTransformerDefinition[Dto, Domain, DecodeOverrides, Flags])

Allows customization of io.scalaland.chimney.Codec derivation.

Allows customization of io.scalaland.chimney.Codec derivation.

Type parameters

DecodeOverrides

type-level encoded config

Domain

type of the domain value

Dto

typeof the DTO value

EncodeOverrides

type-level encoded config

Flags

type-level encoded flags

Attributes

Since

1.2.0

Supertypes
class Object
trait Matchable
class Any
sealed abstract class CollectionFallbackMergeStrategy

What should happen when both source value and fallback values are collections.

What should happen when both source value and fallback values are collections.

Attributes

See also
Since

1.7.0

Supertypes
class Object
trait Matchable
class Any
Known subtypes

Tell the derivation that silent drop of a source field is an error (explicit drop is not).

Tell the derivation that silent drop of a source field is an error (explicit drop is not).

Attributes

See also
Since

1.7.0

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type

Tell the derivation that silent drop of a target subtype is an error (explicit drop is not).

Tell the derivation that silent drop of a target subtype is an error (explicit drop is not).

Attributes

See also
Since

1.7.0

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type

When both source value and fallback values are collections they should be combined using fallback2 ++ fallback1 ++ src.

When both source value and fallback values are collections they should be combined using fallback2 ++ fallback1 ++ src.

Attributes

See also
Since

1.7.0

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type

When both source value and fallback values are of the Option/Either type they should be combined using fallbck2.orElse(fallback1).orElse(src).

When both source value and fallback values are of the Option/Either type they should be combined using fallbck2.orElse(fallback1).orElse(src).

Attributes

See also
Since

1.7.0

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
sealed abstract class ImplicitTransformerPreference

Whether derivation should prefer total or partial transformers if both are provided for some field transformation.

Whether derivation should prefer total or partial transformers if both are provided for some field transformation.

Attributes

See also
Since

0.7.0

Supertypes
class Object
trait Matchable
class Any
Known subtypes
final class IsoDefinition[First, Second, FirstOverrides <: TransformerOverrides, SecondOverrides <: TransformerOverrides, Flags <: TransformerFlags](val first: TransformerDefinition[First, Second, FirstOverrides, Flags], val second: TransformerDefinition[Second, First, SecondOverrides, Flags])

Allows customization of io.scalaland.chimney.Iso derivation.

Allows customization of io.scalaland.chimney.Iso derivation.

Type parameters

First

input type of the first conversion, output type of the second conversion

FirstOverrides

type-level encoded config

Flags

type-level encoded flags

Second

output type of the first conversion, input type of the second conversion

SecondOverrides

type-level encoded config

Attributes

Since

1.2.0

Supertypes
class Object
trait Matchable
class Any
sealed abstract class OptionFallbackMergeStrategy

What should happen when both source value and fallback values are of the Option/Either type.

What should happen when both source value and fallback values are of the Option/Either type.

Attributes

See also
Since

1.7.0

Supertypes
class Object
trait Matchable
class Any
Known subtypes
final class PartialTransformerDefinition[From, To, Overrides <: TransformerOverrides, Flags <: TransformerFlags](val runtimeData: RuntimeDataStore) extends WithRuntimeDataStore

Allows customization of io.scalaland.chimney.PartialTransformer derivation.

Allows customization of io.scalaland.chimney.PartialTransformer derivation.

Type parameters

Flags

type-level encoded flags

From

type of input value

Overrides

type-level encoded config

To

type of output value

Attributes

Since

0.7.0

Supertypes
trait WithRuntimeDataStore
class Object
trait Matchable
class Any
final class PartialTransformerDefinitionForAll[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.

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

Supertypes
trait WithRuntimeDataStore
class Object
trait Matchable
class Any
final class PartialTransformerInto[From, To, Overrides <: TransformerOverrides, Flags <: TransformerFlags](val source: From, val td: PartialTransformerDefinition[From, To, Overrides, Flags]) extends WithRuntimeDataStore

Provides DSL for configuring io.scalaland.chimney.PartialTransformer's generation and using the result to transform value at the same time

Provides DSL for configuring io.scalaland.chimney.PartialTransformer's generation and using the result to transform value at the same time

Type parameters

Flags

type-level encoded flags

From

type of input value

Overrides

type-level encoded config

To

type of output value

Value parameters

source

object to transform

td

transformer definition

Attributes

Since

0.7.0

Supertypes
trait WithRuntimeDataStore
class Object
trait Matchable
class Any
final class PartialTransformerIntoForAll[From, To, Overrides <: TransformerOverrides, Flags <: TransformerFlags, FromMatch, ToMatch](val source: From, val td: PartialTransformerDefinition[From, To, Overrides, Flags]) extends WithRuntimeDataStore

Scoped builder for defining overrides that apply to all matching [FromMatch, ToMatch] derivations, used with .intoPartial[To] syntax.

Scoped builder for defining overrides that apply to all matching [FromMatch, ToMatch] derivations, used with .intoPartial[To] syntax.

Attributes

Since

1.10.0

Supertypes
trait WithRuntimeDataStore
class Object
trait Matchable
class Any
final class PatcherConfiguration[Flags <: PatcherFlags]

Type-level set of derivation flags that can be shared between derivations through implicit scope.

Type-level set of derivation flags that can be shared between derivations through implicit scope.

Type parameters

Flags

type-level encoded flags

Attributes

See also
Since

0.8.0

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Since

0.8.0

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
final class PatcherDefinition[A, Patch, Overrides <: PatcherOverrides, Flags <: PatcherFlags](val runtimeData: RuntimeDataStore) extends WithRuntimeDataStore

Allows customization of io.scalaland.chimney.Patcher derivation.

Allows customization of io.scalaland.chimney.Patcher derivation.

Type parameters

A

type of object to apply patch to

Flags

type-level encoded flags

Overrides

type-level encoded config

Patch

type of patch object

Attributes

Since

0.8.0

Supertypes
trait WithRuntimeDataStore
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
final class PatcherUsing[A, Patch, Overrides <: PatcherOverrides, Flags <: PatcherFlags](val obj: A, val objPatch: Patch, val pd: PatcherDefinition[A, Patch, Overrides, Flags]) extends WithRuntimeDataStore

Provides operations to customize io.scalaland.chimney.Patcher logic for specific object value and patch value.

Provides operations to customize io.scalaland.chimney.Patcher logic for specific object value and patch value.

Type parameters

A

type of object to apply patch to

Flags

type-level encoded flags

Overrides

type-level encoded config

Patch

type of patch object

Value parameters

obj

object to patch

objPatch

patch object

pd

patcher definition

Attributes

Since

0.4.0

Supertypes
trait WithRuntimeDataStore
class Object
trait Matchable
class Any

Tell the derivation to prefer partial transformers.

Tell the derivation to prefer partial transformers.

Attributes

See also
Since

0.7.0

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type

Tell the derivation to prefer total transformers.

Tell the derivation to prefer total transformers.

Attributes

See also
Since

0.7.0

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type

When both source value and fallback values are collections they should be combined using src ++ fallback1 ++ fallback2 ....

When both source value and fallback values are collections they should be combined using src ++ fallback1 ++ fallback2 ....

Attributes

See also
Since

1.7.0

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type

When both source value and fallback values are of the Option/Either type they should be combined using src.orElse(fallback1).orElse(fallback2)....

When both source value and fallback values are of the Option/Either type they should be combined using src.orElse(fallback1).orElse(fallback2)....

Attributes

See also
Since

1.7.0

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type

Provides a way of customizing how fields/subtypes shoud get matched betwen source value and target value.

Provides a way of customizing how fields/subtypes shoud get matched betwen source value and target value.

Attributes

See also
Since

1.0.0

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
Self type
Singleton

Attributes

Since

1.0.0

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
final class TransformerConfiguration[Flags <: TransformerFlags]

Type-level set of derivation flags that can be shared between derivations through implicit scope.

Type-level set of derivation flags that can be shared between derivations through implicit scope.

Type parameters

Flags

type-level encoded flags

Attributes

See also
Since

0.6.0

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Since

0.6.0

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
final class TransformerDefinition[From, To, Overrides <: TransformerOverrides, Flags <: TransformerFlags](val runtimeData: RuntimeDataStore) extends WithRuntimeDataStore

Allows customization of io.scalaland.chimney.Transformer derivation.

Allows customization of io.scalaland.chimney.Transformer derivation.

Type parameters

Flags

type-level encoded flags

From

type of input value

Overrides

type-level encoded config

To

type of output value

Attributes

Since

0.4.0

Supertypes
trait WithRuntimeDataStore
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
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.

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

Supertypes
trait WithRuntimeDataStore
class Object
trait Matchable
class Any
final class TransformerInto[From, To, Overrides <: TransformerOverrides, Flags <: TransformerFlags](val source: From, val td: TransformerDefinition[From, To, Overrides, Flags]) extends WithRuntimeDataStore

Provides DSL for configuring io.scalaland.chimney.Transformer's generation and using the result to transform value at the same time

Provides DSL for configuring io.scalaland.chimney.Transformer's generation and using the result to transform value at the same time

Type parameters

Flags

type-level encoded flags

From

type of input value

Overrides

type-level encoded config

To

type of output value

Value parameters

source

object to transform

td

transformer definition

Attributes

Since

0.1.0

Supertypes
trait WithRuntimeDataStore
class Object
trait Matchable
class Any
final class TransformerIntoForAll[From, To, Overrides <: TransformerOverrides, Flags <: TransformerFlags, FromMatch, ToMatch](val source: From, val td: TransformerDefinition[From, To, Overrides, Flags]) extends WithRuntimeDataStore

Scoped builder for defining overrides that apply to all matching [FromMatch, ToMatch] derivations, used with .into[To] syntax.

Scoped builder for defining overrides that apply to all matching [FromMatch, ToMatch] derivations, used with .into[To] syntax.

Attributes

Since

1.10.0

Supertypes
trait WithRuntimeDataStore
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
sealed abstract class UnmatchedSubtypePolicy

What should happen when derivation is dropping some target subtype without using it for anything.

What should happen when derivation is dropping some target subtype without using it for anything.

Attributes

See also
Since

1.7.0

Supertypes
class Object
trait Matchable
class Any
Known subtypes
sealed abstract class UnusedFieldPolicy

What should happen when derivation is dropping some source field without using it for anything.

What should happen when derivation is dropping some source field without using it for anything.

Attributes

See also
Since

1.7.0

Supertypes
class Object
trait Matchable
class Any
Known subtypes

Extensions

Extensions

extension [A](obj: A)
transparent inline def patchUsing[Patch](patch: Patch)(implicit patcher: AutoDerived[A, Patch]): A

Performs in-place patching of wrapped object with provided value.

Performs in-place patching of wrapped object with provided value.

If you want to customize patching behavior, consider using using method.

Type parameters

Patch

type of patch object

Value parameters

patch

patch object value

patcher

implicit instance of io.scalaland.chimney.Patcher type class

Attributes

Returns

patched value

See also

io.scalaland.chimney.Patcher#deriveAutomatic for default implicit instance

Since

0.4.0

extension [From](source: From)
transparent inline def transformInto[To](implicit transformer: AutoDerived[From, To]): To

Performs in-place transformation of captured source value to target type.

Performs in-place transformation of captured source value to target type.

If you want to customize transformer behavior, consider using io.scalaland.chimney.dsl.TransformerOps#into method.

Type parameters

To

target type

Value parameters

transformer

implicit instance of io.scalaland.chimney.Transformer type class

Attributes

Returns

transformed value of target type To

See also
Since

0.1.0

extension [From](source: From)
transparent inline def transformIntoPartial[To](implicit transformer: AutoDerived[From, To]): Result[To]

Performs in-place partial transformation of captured source value to target type.

Performs in-place partial transformation of captured source value to target type.

If you want to customize transformer behavior, consider using io.scalaland.chimney.dsl.PartialTransformerOps#intoPartial method.

Type parameters

To

result target type of partial transformation

Value parameters

transformer

implicit instance of io.scalaland.chimney.Transformer type class

Attributes

Returns

partial transformation result value of target type To

See also

io.scalaland.chimney.PartialTransformer#deriveAutomatic for default implicit instance

Since

0.7.0

transparent inline def transformIntoPartial[To](failFast: Boolean)(implicit transformer: AutoDerived[From, To]): Result[To]

Performs in-place partial transformation of captured source value to target type.

Performs in-place partial transformation of captured source value to target type.

If you want to customize transformer behavior, consider using io.scalaland.chimney.dsl.PartialTransformerOps#intoPartial method.

Type parameters

To

result target type of partial transformation

Value parameters

failFast

should fail as early as the first set of errors appear

transformer

implicit instance of io.scalaland.chimney.Transformer type class

Attributes

Returns

partial transformation result value of target type To

See also

io.scalaland.chimney.PartialTransformer#deriveAutomatic for default implicit instance

Since

0.7.0