1 #![allow( 2 clippy::too_many_arguments, 3 clippy::cognitive_complexity, 4 clippy::wrong_self_convention 5 )] 6 #[macro_use] 7 mod macros; 8 pub use macros::*; 9 mod aliases; 10 pub use aliases::*; 11 mod bitflags; 12 pub use bitflags::*; 13 #[cfg(feature = "debug")] 14 mod const_debugs; 15 mod constants; 16 pub use constants::*; 17 mod definitions; 18 pub use definitions::*; 19 mod enums; 20 pub use enums::*; 21 mod extensions; 22 pub use extensions::*; 23 mod feature_extensions; 24 pub use feature_extensions::*; 25 mod features; 26 pub use features::*; 27 mod prelude; 28 pub use prelude::*; 29 /// Native bindings from Vulkan headers, generated by bindgen 30 #[allow(clippy::useless_transmute, nonstandard_style)] 31 pub mod native; 32 mod platform_types; 33 pub use platform_types::*; 34 /// Iterates through the pointer chain. Includes the item that is passed into the function. 35 /// Stops at the last [`BaseOutStructure`] that has a null [`BaseOutStructure::p_next`] field. ptr_chain_iter<T>(ptr: &mut T) -> impl Iterator<Item = *mut BaseOutStructure>36pub(crate) unsafe fn ptr_chain_iter<T>(ptr: &mut T) -> impl Iterator<Item = *mut BaseOutStructure> { 37 let ptr = <*mut T>::cast::<BaseOutStructure>(ptr); 38 (0..).scan(ptr, |p_ptr, _| { 39 if p_ptr.is_null() { 40 return None; 41 } 42 let n_ptr = (**p_ptr).p_next; 43 let old = *p_ptr; 44 *p_ptr = n_ptr; 45 Some(old) 46 }) 47 } 48 pub trait Handle { 49 const TYPE: ObjectType; as_raw(self) -> u6450 fn as_raw(self) -> u64; from_raw(_: u64) -> Self51 fn from_raw(_: u64) -> Self; 52 } 53