Skip to main content

diplomat_buffer_write_get_bytes

Function diplomat_buffer_write_get_bytes 

Source
#[unsafe(no_mangle)]
pub extern "C" fn diplomat_buffer_write_get_bytes( this: *mut DiplomatWrite, ) -> *mut u8
Expand description

Grabs a pointer to the underlying buffer of a writable.

Returns null if there was an allocation error during the write construction.

ยงSafety

  • The returned pointer is valid until the passed writable is destroyed.
  • The returned pointer is valid for both reads and writes, however Rust code may not write to it if this is being accessed by other methods simultaneously.
  • this must be a pointer to a valid DiplomatWrite constructed by diplomat_buffer_write_create().