pub trait HandleAllocator:
Send
+ Sync
+ 'static {
// Required methods
fn alloc(&self) -> LoadHandle;
fn free(&self, handle: LoadHandle);
}Expand description
Allocates LoadHandles for Loader implementations.
Required Methods§
Sourcefn alloc(&self) -> LoadHandle
fn alloc(&self) -> LoadHandle
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.
Sourcefn free(&self, handle: LoadHandle)
fn free(&self, handle: LoadHandle)
Frees a LoadHandle, allowing the handle to be returned by a future alloc call.