An Encoder encodes a Scala value of type T into a compatible
Avro value based on the given schema.
For example, given a string, and a schema of type Schema.Type.STRING
then the string would be encoded as an instance of Utf8, whereas
the same string and a Schema.Type.FIXED would be encoded as an
instance of GenericData.Fixed.
Another example is given a Scala enumeration value, and a schema of
type Schema.Type.ENUM, the value would be encoded as an instance
of GenericData.EnumSymbol.
An Encoder encodes a Scala value of type T into a compatible Avro value based on the given schema.
For example, given a string, and a schema of type Schema.Type.STRING then the string would be encoded as an instance of Utf8, whereas the same string and a Schema.Type.FIXED would be encoded as an instance of GenericData.Fixed.
Another example is given a Scala enumeration value, and a schema of type Schema.Type.ENUM, the value would be encoded as an instance of GenericData.EnumSymbol.