#[unsafe(no_mangle)]pub extern "C" fn diplomat_buffer_write_create(
cap: usize,
) -> *mut DiplomatWriteExpand description
Create an DiplomatWrite that can write to a dynamically allocated buffer managed by Rust.
Use diplomat_buffer_write_destroy() to free the writable and its underlying buffer.
The pointer is valid until that function is called.
This is largely used internally by Diplomat-generated FFI code, and should not need to be constructed
manually outside of that context. See RustWriteVec if you need this in Rust.
The grow impl never sets grow_failed, although it is possible for it to panic.