Trait chunky::Handler[][src]

pub trait Handler: Sized {
    fn create_chunk(ident: Ident, size: usize) -> *mut u8;
fn load_or_create_chunk(ident: Ident, size: usize) -> (*mut u8, bool);
fn load_chunk(ident: Ident) -> (*mut u8, usize);
unsafe fn unload_chunk(ptr: *mut u8, size: usize);
unsafe fn destroy_chunk(ptr: *mut u8, size: usize); }

A strategy for managing chunks

Required Methods

Create a new chunk with a given identifier, assumes it doesn't exist

Load a chunk with a given identifier, or create it if it doesn't exist

Load a chunk with a given identifier, assumes it exists

Deallocate a chunk, but keep any persisted representation of it

Deallocate a chunk and delete any persisted representation of it

Implementors