toBuffer method

  1. @override
BuBytes toBuffer()
override

Implementation

@override
BuBytes toBuffer() {
  if (!isBinary) {
    throw BuError(
      DefaultErrorType.invalidArgument,
      "Cannot encode Any to protobuf bytes because its value is not binary.",
    );
  }
  return super.toBuffer();
}