Skip to main content

CustomEntryLoader

Struct CustomEntryLoader 

Source
pub struct CustomEntryLoader<T> {
    pub loader: T,
    pub get_instance_proc_addr: PFN_vkGetInstanceProcAddr,
    pub create_instance: Option<PFN_vkCreateInstance>,
    pub enumerate_instance_version: Option<PFN_vkEnumerateInstanceVersion>,
    pub enumerate_instance_layer_properties: Option<PFN_vkEnumerateInstanceLayerProperties>,
    pub enumerate_instance_extension_properties: Option<PFN_vkEnumerateInstanceExtensionProperties>,
    /* private fields */
}
Expand description

Loader for entry commands.

To create a new loader, call EntryLoader::new.

Fields§

§loader: T§get_instance_proc_addr: PFN_vkGetInstanceProcAddr§create_instance: Option<PFN_vkCreateInstance>§enumerate_instance_version: Option<PFN_vkEnumerateInstanceVersion>§enumerate_instance_layer_properties: Option<PFN_vkEnumerateInstanceLayerProperties>§enumerate_instance_extension_properties: Option<PFN_vkEnumerateInstanceExtensionProperties>

Implementations§

Source§

impl<T> CustomEntryLoader<T>

Provided by crate::vk1_0

Source

pub unsafe fn create_instance( &self, create_info: &InstanceCreateInfo, allocator: Option<&AllocationCallbacks>, ) -> VulkanResult<Instance>

Vulkan Manual Page · Function

Source

pub unsafe fn enumerate_instance_layer_properties( &self, property_count: Option<u32>, ) -> VulkanResult<SmallVec<LayerProperties>>

Vulkan Manual Page · Function

Source

pub unsafe fn enumerate_instance_extension_properties( &self, layer_name: Option<&CStr>, property_count: Option<u32>, ) -> VulkanResult<SmallVec<ExtensionProperties>>

Vulkan Manual Page · Function

Source§

impl<T> CustomEntryLoader<T>

Provided by crate::vk1_1

Source§

impl CustomEntryLoader<Library>

Source

pub fn new() -> Result<EntryLoader, EntryLoaderError>

Load functions using libloading.

Enabled using the loading cargo feature.

For more advanced use cases, take a look at EntryLoader::with_lib_path and EntryLoader::with_library.

Source

pub fn with_lib_path<P: AsRef<OsStr>>( lib_path: P, ) -> Result<EntryLoader, EntryLoaderError>

Load functions using libloading providing a custom library path.

Enabled using the loading cargo feature.

Source§

impl<T> CustomEntryLoader<T>

Source

pub unsafe fn with_library( library: T, symbol: impl FnMut(&mut T, *const c_char) -> Option<PFN_vkVoidFunction>, ) -> Result<Self, LoaderError>

Creates a entry loader with a custom library used for loading.

Source

pub fn enabled(&self) -> &EntryEnabled

Access enabled requirements of this entry loader.

Source

pub fn instance_version(&self) -> u32

This will be the result of vkEnumerateInstanceVersion if available, otherwise 0.1.0.0.

Trait Implementations§

Source§

impl<T> Debug for CustomEntryLoader<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T> Drop for CustomEntryLoader<T>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

§

impl<T> Freeze for CustomEntryLoader<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for CustomEntryLoader<T>
where T: RefUnwindSafe,

§

impl<T> Send for CustomEntryLoader<T>
where T: Send,

§

impl<T> Sync for CustomEntryLoader<T>
where T: Sync,

§

impl<T> Unpin for CustomEntryLoader<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for CustomEntryLoader<T>
where T: UnsafeUnpin,

§

impl<T> UnwindSafe for CustomEntryLoader<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.