Function ket::c_api::error::ket_error_message
source · #[no_mangle]
pub unsafe extern "C" fn ket_error_message(
error_code: i32,
buffer: *mut u8,
buffer_size: usize,
write_size: &mut usize
) -> i32
Expand description
Retrieves the error message associated with an error code.
This function takes an error code as input and returns a pointer to
the error message string. The size
parameter is a mutable reference
that will be updated with the length of the error message string.
§Arguments
error_code
- [in] The error code for which to retrieve the error message.buffer
- [out] A mutable pointer to store the error message string.buffer_size
- [in] The size of the buffer provided.write_size
- [out] A mutable reference to store the size of the error message.
§Safety
This function is marked as unsafe because it deals with raw pointers.