Patcher

io.scalaland.chimney.Patcher
See thePatcher companion object
@FunctionalInterface
trait Patcher[A, Patch] extends AutoDerived[A, Patch]

Type class definition that wraps patching behavior.

Type parameters

A

type of object to apply patch to

Patch

type of patch object

Attributes

See also
Since

0.1.3

Note

You should not need to instantiate this class manually, if you can derive it - take a look at io.scalaland.chimney.Patcher.derive and io.scalaland.chimney.Patcher.define methods for that. Manual intantiation is only necessary if you want to add support for the transformation that is not supported out of the box. Even then consult https://chimney.readthedocs.io/cookbook/#integrations first!

Companion
object
Graph
Supertypes
trait AutoDerived[A, Patch]
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def patch(obj: A, patch: Patch): A

Modifies a copy of one object using values from another object.

Modifies a copy of one object using values from another object.

Value parameters

obj

object to modify

patch

object with modified values

Attributes

Returns

patched copy

Since

0.1.3