Creates a new Encoder instances that applies the specified function before encoding.
Creates a new Encoder instances that applies the specified function before encoding.
This is a convenient way of creating Encoder instances: if you already have an Encoder[E, D, R], need to
write an Encoder[E, DD, R] and know how to turn a DD into a D, you need but call contramap.
Type class for types that can be encoded into others.
encoded type - what to encode to.
decoded type - what to encode from.
tag type.