Google is committed to advancing racial equity for Black communities. See how.

encode method

void encode (Encoder encoder, T value, int base, int depth)

Implementation

void encode(Encoder encoder, T value, int base, int depth) {
  switch (encoder.wireFormat) {
    case WireFormat.v1:
      type.encode(encoder, value, base + offsetV1, depth);
      break;
    case WireFormat.v2:
      type.encode(encoder, value, base + offsetV2, depth);
      break;
    default:
      throw FidlError('unknown wire format');
  }
}