Skip to main content

crashlog_read_export

Function crashlog_read_export 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn crashlog_read_export( context: *mut CrashLogContext, export: *mut CrashLogExport, buffer: *mut u8, buffer_size: usize, ) -> usize
Available on crate feature ffi only.
Expand description

Reads the next chunk of the Crash Log export.

Writes the next buffer_size bytes of the Crash Log export in the buffer pointed by the buffer argument.

Returns the amount of bytes that has been written into the buffer. Zero is returned if an error occurred or if no more data is available.

ยงSafety

This must be called with a pointer to a CrashLogContext that was earlier obtained by calling the crashlog_init function.

The export pointer must be obtained using the crashlog_export_to_json function or the crashlog_export_to_cper function.

The buffer pointer must point to a valid writable memory region of buffer_size bytes. The data written to this buffer is not nul-terminated.