PartialTransformer

io.scalaland.chimney.PartialTransformer
See thePartialTransformer companion object
trait PartialTransformer[From, To] extends AutoDerived[From, To]

Type class expressing partial transformation between source type From and target type To, with the ability of reporting path-annotated transformation error(s).

Type parameters

From

type of input value

To

type of output value

Attributes

See also
Since

0.7.0

Companion
object
Graph
Supertypes
trait AutoDerived[From, To]
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def transform(src: From, failFast: Boolean): Result[To]

Run transformation using provided value as a source.

Run transformation using provided value as a source.

Value parameters

failFast

whether the transformation should return as early as the first set of errors appear (true), or should it attempt to convert what it can and then aggregate all errors (false)

src

source value

Attributes

Returns

io.scalaland.chimney.partial.Result of the transformation

Since

0.7.0

Concrete methods

final def transform(src: From): Result[To]

Run transformation using provided value as a source in error accumulation mode.

Run transformation using provided value as a source in error accumulation mode.

Value parameters

src

source value

Attributes

Returns

io.scalaland.chimney.partial.Result of the transformation

Since

0.7.0

final def transformFailFast(src: From): Result[To]

Run transformation using provided value as a source in short-circuit (fail fast) mode.

Run transformation using provided value as a source in short-circuit (fail fast) mode.

Value parameters

src

source value

Attributes

Returns

io.scalaland.chimney.partial.Result of the transformation

Since

0.7.0