Trait distill_loader::storage::HandleAllocator[][src]

pub trait HandleAllocator: Send + Sync + 'static {
    fn alloc(&self) -> LoadHandle;
fn free(&self, handle: LoadHandle); }

Allocates LoadHandles for Loader implementations.

Required methods

fn alloc(&self) -> LoadHandle[src]

Allocates a LoadHandle for use by a crate::loader::Loader. The same LoadHandle must not be returned by this function until it has been passed to free. NOTE: The most significant bit of the u64 in the LoadHandle returned MUST be unset, as it is reserved for indicating whether the handle is indirect or not.

fn free(&self, handle: LoadHandle)[src]

Frees a LoadHandle, allowing the handle to be returned by a future alloc call.

Loading content...

Implementors

Loading content...