Codec

io.scalaland.chimney.Codec
See theCodec companion object
final case class Codec[Domain, Dto](encode: Transformer[Domain, Dto], decode: PartialTransformer[Dto, Domain])

Type class representing bidirectional conversion from the type that can be always converted (total transformation), usually the domain model, into type that has to be validated when converting back (partial transformation), usually the DTO model.

Type parameters

Domain

type of the domain value

Dto

typeof the DTO value

Value parameters

decode

conversion from DTO to domain model which can fail

encode

conversion from domain model to DTO which is guaranteed to succeed

Attributes

See also
Since

1.2.0

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product