PatcherDefinition

io.scalaland.chimney.dsl.PatcherDefinition
final class PatcherDefinition[A, Patch, Overrides <: PatcherOverrides, Flags <: PatcherFlags]

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

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

inline def buildPatcher[ImplicitScopeFlags <: PatcherFlags](using tc: PatcherConfiguration[ImplicitScopeFlags]): Patcher[A, Patch]

Build Patcher using current configuration.

Build Patcher using current configuration.

It runs macro that tries to derive instance of Patcher[A, Patch]. When transformation can't be derived, it results with compilation error.

Attributes

Returns

io.scalaland.chimney.Patcher type class instance

Since

0.8.0

Inherited methods

def clearOnNoneInPatch: [Flags1 <: PatcherFlags] =>> PatcherDefinition[A, Patch, Overrides, Flags1][Disable[IgnoreNoneInPatch, Flags]]

Then there scala.Option is patching scala.Option, on scala.None value will be cleared.

Then there scala.Option is patching scala.Option, on scala.None value will be cleared.

Attributes

Returns

io.scalaland.chimney.dsl.PatcherUsing

See also
Since

0.8.0

Inherited from:
PatcherFlagsDsl (hidden)
def disableMacrosLogging: [Flags1 <: PatcherFlags] =>> PatcherDefinition[A, Patch, Overrides, Flags1][Disable[MacrosLogging, Flags]]

Disable printing the logs from the derivation process.

Disable printing the logs from the derivation process.

Attributes

See also
Since

0.8.0

Inherited from:
PatcherFlagsDsl (hidden)
def enableMacrosLogging: [Flags1 <: PatcherFlags] =>> PatcherDefinition[A, Patch, Overrides, Flags1][Enable[MacrosLogging, Flags]]

Enable printing the logs from the derivation process.

Enable printing the logs from the derivation process.

Attributes

See also
Since

0.8.0

Inherited from:
PatcherFlagsDsl (hidden)
def failRedundantPatcherFields: [Flags1 <: PatcherFlags] =>> PatcherDefinition[A, Patch, Overrides, Flags1][Disable[IgnoreRedundantPatcherFields, Flags]]

Fail the compilation if there is a redundant field in patching object.

Fail the compilation if there is a redundant field in patching object.

Attributes

Returns

io.scalaland.chimney.dsl.PatcherUsing

See also
Since

0.8.0

Inherited from:
PatcherFlagsDsl (hidden)
def ignoreNoneInPatch: [Flags1 <: PatcherFlags] =>> PatcherDefinition[A, Patch, Overrides, Flags1][Enable[IgnoreNoneInPatch, Flags]]

In case when both object to patch and patch value contain field of type scala.Option, this option allows to treat scala.None value in patch as if the value was not provided.

In case when both object to patch and patch value contain field of type scala.Option, this option allows to treat scala.None value in patch as if the value was not provided.

By default, when scala.None is delivered in patch, Chimney clears the value of such field on patching.

Attributes

Returns

io.scalaland.chimney.dsl.PatcherUsing

See also
Since

0.4.0

Inherited from:
PatcherFlagsDsl (hidden)
def ignoreRedundantPatcherFields: [Flags1 <: PatcherFlags] =>> PatcherDefinition[A, Patch, Overrides, Flags1][Enable[IgnoreRedundantPatcherFields, Flags]]

In case that patch object contains a redundant field (i.e. field that is not present in patched object type), this option enables ignoring value of such fields and generate patch successfully.

In case that patch object contains a redundant field (i.e. field that is not present in patched object type), this option enables ignoring value of such fields and generate patch successfully.

By default, when Chimney detects a redundant field in patch object, it fails the compilation in order to prevent silent oversight of field name typos.

Attributes

Returns

io.scalaland.chimney.dsl.PatcherUsing

See also
Since

0.4.0

Inherited from:
PatcherFlagsDsl (hidden)