encodeTo method
Convert self to a slice and append it to the destination.
Implementation
@override
void encodeTo(Result<R, E> value, Output output) {
if (value.isOk) {
output.pushByte(0);
okCodec.encodeTo(value.okValue as R, output);
} else {
output.pushByte(1);
errCodec.encodeTo(value.errValue as E, output);
}
}