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 Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Members list
In this article