PartialTransformer

io.scalaland.chimney.PartialTransformer
See thePartialTransformer companion trait

Attributes

See also
Since

0.7.0

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

object AutoDerived

Attributes

Since

0.8.0

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait AutoDerived[From, To]

Type class used when you want o allow using automatically derived transformations.

Type class used when you want o allow using automatically derived transformations.

When we want to only allow semiautomatically derived/manually defined instances you should use io.scalaland.chimney.PartialTransformer.

Type parameters

From

type of input value

To

type of output value

Attributes

See also
Since

0.8.0

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait PartialTransformer[From, To]

Value members

Concrete methods

def apply[From, To](f: From => Result[To]): PartialTransformer[From, To]

Construct ad-hoc instance of partial transformer from transforming function returning partial result.

Construct ad-hoc instance of partial transformer from transforming function returning partial result.

Type parameters

From

type of input value

To

type of output value

Value parameters

f

transforming function returning partial result

Attributes

Returns

io.scalaland.chimney.PartialTransformer type class instance

Since

0.7.0

def define[From, To]: PartialTransformerDefinition[From, To, Empty, Default]

Type parameters

From

type of input value

To

type of output value

Attributes

Returns

io.scalaland.chimney.dsl.PartialTransformerDefinition with defaults

See also
Since

0.7.0

def fromFunction[From, To](f: From => To): PartialTransformer[From, To]

Construct ad-hoc instance of partial transformer from transforming function returning target value.

Construct ad-hoc instance of partial transformer from transforming function returning target value.

Type parameters

From

type of input value

To

type of output value

Value parameters

f

transforming function returning target value

Attributes

Returns

io.scalaland.chimney.PartialTransformer type class instance

Since

0.7.0

def liftTotal[From, To](t: Transformer[From, To]): PartialTransformer[From, To]

Lifts total transformer to partial transformer

Lifts total transformer to partial transformer

Type parameters

From

type of input value

To

type of output value

Value parameters

t

instance of total transformer

Attributes

Returns

io.scalaland.chimney.PartialTransformer type class instance

Since

0.7.0

Inherited methods

inline def derive[From, To]: PartialTransformer[From, To]

Provides io.scalaland.chimney.PartialTransformer derived with the default settings.

Provides io.scalaland.chimney.PartialTransformer derived with the default settings.

When transformation can't be derived, it results with compilation error.

Type parameters

From

type of input value

To

type of output value

Attributes

Returns

io.scalaland.chimney.PartialTransformer type class definition

Since

0.8.0

Inherited from:
PartialTransformerCompanionPlatform (hidden)