Skip to main content

jpegxl_alloc_func

Type Alias jpegxl_alloc_func 

Source
pub type jpegxl_alloc_func = Option<unsafe extern "C" fn(opaque: *mut c_void, size: usize) -> *mut c_void>;
Expand description

Allocating function for a memory region of a given size.

Allocates a contiguous memory region of size @p size bytes. The returned memory may not be aligned to a specific size or initialized at all.

@param opaque custom memory manager handle provided by the caller. @param size in bytes of the requested memory region. @return @c NULL if the memory can not be allocated, @return pointer to the memory otherwise.

Aliased Type§

pub enum jpegxl_alloc_func {
    None,
    Some(unsafe extern "C" fn(*mut c_void, usize) -> *mut c_void),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(*mut c_void, usize) -> *mut c_void)

Some value of type T.