pub trait DispatchableHandle: Handle<Repr = usize> {
// Provided method
unsafe fn dispatch_key(self) -> usize { ... }
}Expand description
A Handle with a representation of usize (a pointer to an opaque type).
https://docs.vulkan.org/spec/latest/chapters/fundamentals.html#fundamentals-objectmodel-overview
Provided Methods§
Sourceunsafe fn dispatch_key(self) -> usize
unsafe fn dispatch_key(self) -> usize
Gets the dispatch key for this dispatchable handle.
As described in the
driver interface to the Vulkan loader,
all dispatchable handles created by Vulkan drivers can be cast to
void** (a.k.a., *mut *mut c_void). The Vulkan loader will always
replace the first entry in this array of pointers with a pointer to the
dispatch table (created and owned by the loader) for the dispatchable
handle. This guarantee can be used to extract a key from a dispatchable
handle that is stable and unique to an Instance or Device or the
Instance or Device another type of dispatchable device is
associated with (e.g., a CommandBuffer is associated with the
Device it was created for).
§Safety
This handle must be a valid Vulkan dispatchable handle.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.