pub enum MemoryType {
Pool(&'static mut [u8]),
Callback {
alloc: unsafe extern "C" fn(size: c_uint, type_: FMOD_MEMORY_TYPE, sourcestr: *const c_char) -> *mut c_void,
realloc: FMOD_MEMORY_REALLOC_CALLBACK,
free: unsafe extern "C" fn(ptr: *mut c_void, type_: FMOD_MEMORY_TYPE, sourcestr: *const c_char),
},
}
Expand description
How you want FMOD to handle memory.
Variants§
Pool(&'static mut [u8])
Static block of memory for FMOD to manage.
Callback
Custom allocator functions.
Fields
§
alloc: unsafe extern "C" fn(size: c_uint, type_: FMOD_MEMORY_TYPE, sourcestr: *const c_char) -> *mut c_void
Memory allocation callback compatible with ANSI malloc.
§
realloc: FMOD_MEMORY_REALLOC_CALLBACK
Memory reallocation callback compatible with ANSI realloc.
Trait Implementations§
Source§impl Debug for MemoryType
impl Debug for MemoryType
Source§impl PartialEq for MemoryType
impl PartialEq for MemoryType
impl Eq for MemoryType
impl StructuralPartialEq for MemoryType
Auto Trait Implementations§
impl Freeze for MemoryType
impl RefUnwindSafe for MemoryType
impl Send for MemoryType
impl Sync for MemoryType
impl Unpin for MemoryType
impl !UnwindSafe for MemoryType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more