Transformer

io.scalaland.chimney.Transformer
See theTransformer companion object
@FunctionalInterface
trait Transformer[From, To] extends AutoDerived[From, To]

Type class expressing total transformation between source type From and target type To.

Type parameters

From

type of input value

To

type of output value

Attributes

See also
Since

0.1.0

Note

You should not need to instantiate this class manually, if you can derive it - take a look at io.scalaland.chimney.Transformer.derive and io.scalaland.chimney.Transformer.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[From, To]
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def transform(src: From): To

Run transformation using provided value as a source.

Run transformation using provided value as a source.

Value parameters

src

source value

Attributes

Returns

transformed value

Since

0.1.0