"TxBuilder::add_data could enforce common standardness rules (max 80 bytes and at most one such output per transaction). It would also prevent a potential panic to be triggered from within rust-bitcoin (in push_slice_no_opt) if the data is too large, although i don't think it's realistic as a request for creating a 4GiB OP_RETURN would probably fail before then."
"TxBuilder::add_data could enforce common standardness rules (max 80 bytes and at most one such output per transaction). It would also prevent a potential panic to be triggered from within rust-bitcoin (in push_slice_no_opt) if the data is too large, although i don't think it's realistic as a request for creating a 4GiB OP_RETURN would probably fail before then."