pub trait MemoryManager {
// Required methods
fn alloc(&self) -> JpegxlAllocFunc;
fn free(&self) -> JpegxlFreeFunc;
// Provided method
fn manager(&self) -> JxlMemoryManager { ... }
}Expand description
General trait for a memory manager
Required Methods§
Sourcefn alloc(&self) -> JpegxlAllocFunc
fn alloc(&self) -> JpegxlAllocFunc
Return a custom allocating function
Sourcefn free(&self) -> JpegxlFreeFunc
fn free(&self) -> JpegxlFreeFunc
Return a custom deallocating function
Provided Methods§
Sourcefn manager(&self) -> JxlMemoryManager
fn manager(&self) -> JxlMemoryManager
Helper conversion function for C API