pub unsafe extern "C" fn ghostty_formatter_format_alloc(
formatter: Formatter,
allocator: *const Allocator,
out_ptr: *mut *mut u8,
out_len: *mut usize,
) -> TypeExpand description
Run the formatter and return an allocated buffer with the output.
Each call formats the current terminal state. The buffer is allocated using the provided allocator (or the default allocator if NULL). The caller is responsible for freeing the returned buffer with ghostty_free(), passing the same allocator (or NULL for the default) that was used for the allocation.
failure