//! # Vulkan API
//!
//! <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/index.html>
//!
//! ## Examples
//!
//! ```no_run
//! use ash::{vk, Entry};
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let entry = Entry::linked();
//! let app_info = vk::ApplicationInfo {
//! api_version: vk::make_api_version(0, 1, 0, 0),
//! ..Default::default()
//! };
//! let create_info = vk::InstanceCreateInfo {
//! p_application_info: &app_info,
//! ..Default::default()
//! };
//! let instance = unsafe { entry.create_instance(&create_info, None)? };
//! # Ok(()) }
//! ```
//!
//! ## Getting started
//!
//! Load the Vulkan library linked at compile time using [`Entry::linked()`], or load it at runtime
//! using [`Entry::load()`], which uses `libloading`. If you want to perform entry point loading
//! yourself, call [`Entry::from_static_fn()`].
//!
//! ## Crate features
//!
//! * **debug** (default): Whether Vulkan structs should implement `Debug`.
//! * **loaded** (default): Support searching for the Vulkan loader manually at runtime.
//! * **linked**: Link the Vulkan loader at compile time.
pub use crate Device;
pub use crate Entry;
pub use crate LoadingError;
pub use crate Instance;
/// Raw Vulkan bindings and types, generated from `vk.xml`
// macros of vk need to be defined beforehand
/// Wrappers for Vulkan extensions
/// Given a mutable raw pointer to a type with an `s_type` member such as [`vk::BaseOutStructure`],
/// match on a set of Vulkan structures. The struct will be rebound to the given variable of the
/// type of the given Vulkan structure.
///
/// Note that all match bodies have to be enclosed by curly braces due to macro parsing limitations.
/// It is unfortunately not possible to write `x @ ash::vk::SomeStruct => one_line_expression(),`.
///
/// ```
/// let mut info = ash::vk::DeviceCreateInfo::default();
/// let info: *mut ash::vk::BaseOutStructure = <*mut _>::cast(&mut info);
/// unsafe {
/// ash::match_out_struct!(match info {
/// info @ ash::vk::DeviceQueueCreateInfo => {
/// dbg!(&info); // Unreachable
/// }
/// info @ ash::vk::DeviceCreateInfo => {
/// dbg!(&info);
/// }
/// })
/// }
/// ```
///
/// In addition this macro propagates implicit return values just like normal `match` blocks, as
/// long as a default value or expression is provided in the "any" match arm
/// (`_ => { some_value() }`). For the time being said arm must be wrapped in curly braces; an
/// expression like `_ => None` is not yet supported.
///
/// ```
/// # let mut info = ash::vk::DeviceCreateInfo::default();
/// # let info: *mut ash::vk::BaseOutStructure = <*mut _>::cast(&mut info);
/// let device_create_flags: Option<ash::vk::DeviceCreateFlags> = unsafe {
/// ash::match_out_struct!(match info {
/// info @ ash::vk::DeviceQueueCreateInfo => {
/// dbg!(&info); // Unreachable
/// Some(ash::vk::DeviceCreateFlags::empty())
/// }
/// info @ ash::vk::DeviceCreateInfo => {
/// dbg!(&info);
/// Some(info.flags)
/// }
/// _ => {
/// None
/// }
/// })
/// };
/// ```
) => ;
}
/// Given an immutable raw pointer to a type with an `s_type` member such as [`vk::BaseInStructure`],
/// match on a set of Vulkan structures. The struct will be rebound to the given variable of the
/// type of the given Vulkan structure.
///
/// Note that all match bodies have to be enclosed by curly braces due to macro parsing limitations.
/// It is unfortunately not possible to write `x @ ash::vk::SomeStruct => one_line_expression(),`.
///
/// ```
/// let info = ash::vk::DeviceCreateInfo::default();
/// let info: *const ash::vk::BaseInStructure = <*const _>::cast(&info);
/// unsafe {
/// ash::match_in_struct!(match info {
/// info @ ash::vk::DeviceQueueCreateInfo => {
/// dbg!(&info); // Unreachable
/// }
/// info @ ash::vk::DeviceCreateInfo => {
/// dbg!(&info);
/// }
/// })
/// }
/// ```
///
/// See the [`match_out_struct!`] documentation for an example with implicit return values.
) => ;
}