public static ByteBuf serializeTrailersAsMessage(ByteBufAllocator alloc, HttpHeaders trailers) {
        final ByteBuf serialized = alloc.buffer();
        boolean success = false;
        try {
            serializeTrailersAsMessage(serialized, trailers);
            success = true;
        } finally {
            if (!success) {
                serialized.release();
            }
        }
        return serialized;
    }
Serializes the specified {@link HttpHeaders} to send as a body in gRPC-Web.
grpc-protocol/src/main/java/com/linecorp/armeria/internal/common/grpc/protocol/GrpcTrailersUtil.java