sse_encode_my_value method

  1. @protected
void sse_encode_my_value(
  1. MyValue self,
  2. SseSerializer serializer
)
override

Implementation

@protected
void sse_encode_my_value(MyValue self, SseSerializer serializer) {
  // Codec=Sse (Serialization based), see doc to use other codecs
  switch (self) {
    case MyValue_Bool(field0: final field0):
      sse_encode_i_32(0, serializer);
      sse_encode_bool(field0, serializer);
    case MyValue_String(field0: final field0):
      sse_encode_i_32(1, serializer);
      sse_encode_String(field0, serializer);
    case MyValue_Array(field0: final field0):
      sse_encode_i_32(2, serializer);
      sse_encode_list_my_value(field0, serializer);
  }
}