ConcatEncoder
final class ConcatEncoder[T](encoder0: Encoder[T], encoder1: Encoder[T], maxBufferSize: Int) extends Encoder[T]
Creates a new Encoder which emits the flat, concatenated encoding of two other encoders. Only works with encoders that encode to arrays or maps and both encoders must be of the same type, i.e. both encode to an array or both encode to a map. If the encoders are incompatible or produce elements that are not wrapped in an array or map each encoding attempt will fail with a Borer.Error.Unsupported exception.
- Value parameters:
- maxBufferSize
the maximum size of the buffer for the encoding of the first encoder