decode method

T decode (Decoder decoder, int base, int depth)

Implementation

T decode(Decoder decoder, int base, int depth) {
  switch (decoder.wireFormat) {
    case WireFormat.v1:
    // Old versions of the C-bindings are sending V2-compatible messages
    // with the V1 header.
    case WireFormat.v2:
      return type.decode(decoder, base + offset, depth);
    default:
      throw FidlError('unknown wire format');
  }
}