marshalForCodec static method
Marshal msg with the codec selected for a call (struct layout when negotiated).
Implementation
static Uint8List marshalForCodec(bool structCodec, Marshaler msg) {
if (structCodec) {
if (msg is StructMarshaler) {
return (msg as StructMarshaler).marshalStruct();
}
throw StatusException(Wire.codeInternal, 'message has no struct codec');
}
return msg.marshalDc();
}