PatcherUsing

io.scalaland.chimney.dsl.PatcherUsing
final class PatcherUsing[A, Patch, Overrides <: PatcherOverrides, Flags <: PatcherFlags](val obj: A, val objPatch: Patch)

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

Attributes

Since

0.4.0

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

inline def patch[ImplicitScopeFlags <: PatcherFlags](using tc: PatcherConfiguration[ImplicitScopeFlags]): A

Applies configured patching in-place.

Applies configured patching in-place.

Attributes

Returns

patched value

Since

0.4.0

Inherited methods

def clearOnNoneInPatch: [Flags1 <: PatcherFlags] =>> PatcherUsing[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] =>> PatcherUsing[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] =>> PatcherUsing[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] =>> PatcherUsing[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] =>> PatcherUsing[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] =>> PatcherUsing[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)

Concrete fields

val obj: A
val objPatch: Patch