From 073c6a8be13e92a0f43130e950d262e4f3e65f0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacopo=20Lib=C3=A8?= Date: Thu, 25 May 2023 02:09:56 +0200 Subject: [PATCH 1/9] Add support for structextends --- generator/src/main.rs | 83 +++++- openxr/src/generated.rs | 88 ++++++ sys/src/generated.rs | 644 +++++++++++++++++++++++++++++++++++++++- sys/src/lib.rs | 15 + 4 files changed, 821 insertions(+), 9 deletions(-) diff --git a/generator/src/main.rs b/generator/src/main.rs index 13613a9c..4e2ad889 100644 --- a/generator/src/main.rs +++ b/generator/src/main.rs @@ -12,7 +12,7 @@ use std::{ use heck::{ToShoutySnakeCase, ToSnakeCase, ToUpperCamelCase}; use indexmap::{IndexMap, IndexSet}; use proc_macro2::{Span, TokenStream}; -use quote::quote; +use quote::{format_ident, quote}; use regex::Regex; use syn::{Ident, LitByteStr}; use xml::{ @@ -580,6 +580,7 @@ impl Parser { } } let parent: Option = attr(attrs, "parentstruct").map(|x| x.into()); + let extends: Option> = attr(attrs, "structextends").map(|x| Rc::from(x)); if let Some(ref parent) = parent { self.base_headers .entry(parent.clone()) @@ -596,6 +597,7 @@ impl Parser { members, ty, extension: None, + extends, mut_next, }, ); @@ -1087,6 +1089,11 @@ impl Parser { #conditions2 impl #ident { pub const TYPE: StructureType = StructureType::#ty; + + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } + #out } } @@ -1380,6 +1387,24 @@ impl Parser { }) .collect::>(); + let root_structs = self + .structs + .iter() + .filter_map(|(name, s)| { + if s.extension + .as_ref() + .map_or(false, |ext| self.disabled_exts.contains(ext)) + { + return None; + } + if self.is_root_struct(name, s) { + Some(&name[..]) + } else { + None + } + }) + .collect::>(); + let reexports = simple_structs .iter() .cloned() @@ -1447,6 +1472,7 @@ impl Parser { let whitelist = [ "XrCompositionLayerProjectionView", + "XrCompositionLayerDepthInfoKHR", "XrSwapchainSubImage", "XrActionSetCreateInfo", "XrActionCreateInfo", @@ -1456,7 +1482,7 @@ impl Parser { .collect::>(); let builders = self.structs.iter().filter_map(|(name, s)| { if whitelist.contains(&name[..]) { - Some(self.generate_builder(&struct_meta, &simple_structs, name, s)) + Some(self.generate_builder(&struct_meta, &simple_structs, &root_structs, name, s)) } else { None } @@ -1834,6 +1860,7 @@ impl Parser { &self, meta: &HashMap<&str, StructMeta>, simple: &IndexSet<&str>, + root: &IndexSet<&str>, name: &str, s: &Struct, ) -> TokenStream { @@ -1843,6 +1870,40 @@ impl Parser { let inits = self.generate_builder_inits(s); let conds = conditions(name, s.extension.as_ref().map(|x| &x[..])); let conds2 = conds.clone(); + let is_root_struct = root.contains(name); + let extends_name = format_ident!("Extends{}", ident); + let extend_trait = if is_root_struct { + quote!(pub unsafe trait #extends_name {}) + } else { + quote!() + }; + // Adds a `push_next` method to the builder if the struct is a root struct + // based on Ash + let next_fn = if is_root_struct { + quote! { + #[inline] + pub fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let other: &mut sys::BaseOutStructure = mem::transmute(next); + let next_ptr = <*mut sys::BaseOutStructure>::cast((*other).next); + let last_next = sys::ptr_chain_iter(other).last().unwrap(); + (*last_next).next = self.inner.next as _; + self.inner.next = next_ptr; + } + self + } + } + } else { + quote!() + }; + let implement_extensions = if let Some(parent_struct) = s.extends.as_ref() { + let parent_ident = xr_ty_name(parent_struct); + let parent_extend_name = format_ident!("Extends{}", parent_ident); + quote!(unsafe impl #type_params #parent_extend_name for #ident #type_args {}) + } else { + quote!() + }; + quote! { #[derive(Copy, Clone)] #[repr(transparent)] @@ -1889,6 +1950,8 @@ impl Parser { } #setters + + #next_fn } impl #type_params Default for #ident #type_args { @@ -1896,6 +1959,10 @@ impl Parser { Self::new() } } + + #extend_trait + + #implement_extensions } } @@ -1976,6 +2043,17 @@ impl Parser { && !self.handles.contains(&x.ty) }) } + + /// Determine whether a struct is a root struct to be reexported with a push next function + fn is_root_struct(&self, s_name: &str, s: &Struct) -> bool { + s.extends.is_none() + && self.structs.iter().any(|(_, v)| { + v.extends + .as_ref() + .map(|parent_name| parent_name.as_ref() == s_name) + .unwrap_or(false) + }) + } } #[derive(Debug, Copy, Clone, Default)] @@ -2069,6 +2147,7 @@ enum ConstantValue { struct Struct { members: Vec, extension: Option>, + extends: Option>, ty: Option, mut_next: bool, } diff --git a/openxr/src/generated.rs b/openxr/src/generated.rs index b902957c..690a7d90 100644 --- a/openxr/src/generated.rs +++ b/openxr/src/generated.rs @@ -4503,12 +4503,100 @@ pub(crate) mod builder { self.inner.sub_image = value.inner; self } + #[inline] + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { + unsafe { + let other: &mut sys::BaseOutStructure = mem::transmute(next); + let next_ptr = <*mut sys::BaseOutStructure>::cast((*other).next); + let last_next = sys::ptr_chain_iter(other).last().unwrap(); + (*last_next).next = self.inner.next as _; + self.inner.next = next_ptr; + } + self + } } impl<'a, G: Graphics> Default for CompositionLayerProjectionView<'a, G> { fn default() -> Self { Self::new() } } + pub unsafe trait ExtendsCompositionLayerProjectionView {} + #[derive(Copy, Clone)] + #[repr(transparent)] + pub struct CompositionLayerDepthInfoKHR<'a, G: Graphics> { + inner: sys::CompositionLayerDepthInfoKHR, + _marker: PhantomData<&'a G>, + } + impl<'a, G: Graphics> CompositionLayerDepthInfoKHR<'a, G> { + #[inline] + pub fn new() -> Self { + Self { + inner: sys::CompositionLayerDepthInfoKHR { + ty: sys::StructureType::COMPOSITION_LAYER_DEPTH_INFO_KHR, + ..unsafe { mem::zeroed() } + }, + _marker: PhantomData, + } + } + #[doc = r" Initialize with the supplied raw values"] + #[doc = r""] + #[doc = r" # Safety"] + #[doc = r""] + #[doc = r" The guarantees normally enforced by this builder (e.g. lifetimes) must be"] + #[doc = r" preserved."] + #[inline] + pub unsafe fn from_raw(inner: sys::CompositionLayerDepthInfoKHR) -> Self { + Self { + inner, + _marker: PhantomData, + } + } + #[inline] + pub fn into_raw(self) -> sys::CompositionLayerDepthInfoKHR { + self.inner + } + #[inline] + pub fn as_raw(&self) -> &sys::CompositionLayerDepthInfoKHR { + &self.inner + } + #[inline] + pub fn sub_image(mut self, value: SwapchainSubImage<'a, G>) -> Self { + self.inner.sub_image = value.inner; + self + } + #[inline] + pub fn min_depth(mut self, value: f32) -> Self { + self.inner.min_depth = value; + self + } + #[inline] + pub fn max_depth(mut self, value: f32) -> Self { + self.inner.max_depth = value; + self + } + #[inline] + pub fn near_z(mut self, value: f32) -> Self { + self.inner.near_z = value; + self + } + #[inline] + pub fn far_z(mut self, value: f32) -> Self { + self.inner.far_z = value; + self + } + } + impl<'a, G: Graphics> Default for CompositionLayerDepthInfoKHR<'a, G> { + fn default() -> Self { + Self::new() + } + } + unsafe impl<'a, G: Graphics> ExtendsCompositionLayerProjectionView + for CompositionLayerDepthInfoKHR<'a, G> + { + } #[derive(Copy, Clone)] #[repr(transparent)] pub struct ActionSetCreateInfo<'a> { diff --git a/sys/src/generated.rs b/sys/src/generated.rs index bbbf49bb..1be1184a 100644 --- a/sys/src/generated.rs +++ b/sys/src/generated.rs @@ -1394,13 +1394,13 @@ impl fmt::Debug for PerfSettingsSubDomainEXT { #[derive(Copy, Clone, Eq, PartialEq)] pub struct PerfSettingsLevelEXT(i32); impl PerfSettingsLevelEXT { - #[doc = "Performance settings hint used by the application to indicate that it enters a non-XR\n section (head-locked / static screen), during which power savings are to be prioritized"] + #[doc = "Performance settings hint used by the application to indicate that it enters a non-XR\r\n section (head-locked / static screen), during which power savings are to be prioritized"] pub const POWER_SAVINGS: PerfSettingsLevelEXT = Self(0i32); - #[doc = "Performance settings hint used by the application to indicate that it enters a low\n and stable complexity section, during which reducing power is more important than\n occasional late rendering frames"] + #[doc = "Performance settings hint used by the application to indicate that it enters a low\r\n and stable complexity section, during which reducing power is more important than\r\n occasional late rendering frames"] pub const SUSTAINED_LOW: PerfSettingsLevelEXT = Self(25i32); - #[doc = "Performance settings hint used by the application to indicate that it enters\n a high or dynamic complexity section, during which the XR Runtime strives for consistent\n XR compositing and frame rendering within a thermally sustainable range"] + #[doc = "Performance settings hint used by the application to indicate that it enters\r\n a high or dynamic complexity section, during which the XR Runtime strives for consistent\r\n XR compositing and frame rendering within a thermally sustainable range"] pub const SUSTAINED_HIGH: PerfSettingsLevelEXT = Self(50i32); - #[doc = "Performance settings hint used by the application to indicate that the application enters\n a section with very high complexity, during which the XR Runtime is allowed to step\n up beyond the thermally sustainable range"] + #[doc = "Performance settings hint used by the application to indicate that the application enters\r\n a section with very high complexity, during which the XR Runtime is allowed to step\r\n up beyond the thermally sustainable range"] pub const BOOST: PerfSettingsLevelEXT = Self(75i32); pub fn from_raw(x: i32) -> Self { Self(x) @@ -1426,11 +1426,11 @@ impl fmt::Debug for PerfSettingsLevelEXT { #[derive(Copy, Clone, Eq, PartialEq)] pub struct PerfSettingsNotificationLevelEXT(i32); impl PerfSettingsNotificationLevelEXT { - #[doc = "Notifies that the sub-domain has reached a level\n where no further actions other than currently applied are necessary"] + #[doc = "Notifies that the sub-domain has reached a level\r\n where no further actions other than currently applied are necessary"] pub const NORMAL: PerfSettingsNotificationLevelEXT = Self(0i32); - #[doc = "Notifies that the sub-domain has reached an early warning level\n where the application should start proactive mitigation actions\n with the goal to return to the XR_PERF_NOTIF_LEVEL_NORMAL level"] + #[doc = "Notifies that the sub-domain has reached an early warning level\r\n where the application should start proactive mitigation actions\r\n with the goal to return to the XR_PERF_NOTIF_LEVEL_NORMAL level"] pub const WARNING: PerfSettingsNotificationLevelEXT = Self(25i32); - #[doc = "Notifies that the sub-domain has reached a critical\n level with significant performance degradation.\n The application should take drastic mitigation action"] + #[doc = "Notifies that the sub-domain has reached a critical\r\n level with significant performance degradation.\r\n The application should take drastic mitigation action"] pub const IMPAIRED: PerfSettingsNotificationLevelEXT = Self(75i32); pub fn from_raw(x: i32) -> Self { Self(x) @@ -3070,6 +3070,9 @@ pub struct ApiLayerProperties { } impl ApiLayerProperties { pub const TYPE: StructureType = StructureType::API_LAYER_PROPERTIES; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -3094,6 +3097,9 @@ pub struct ExtensionProperties { } impl ExtensionProperties { pub const TYPE: StructureType = StructureType::EXTENSION_PROPERTIES; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -3132,6 +3138,9 @@ pub struct InstanceCreateInfo { } impl InstanceCreateInfo { pub const TYPE: StructureType = StructureType::INSTANCE_CREATE_INFO; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3144,6 +3153,9 @@ pub struct InstanceProperties { } impl InstanceProperties { pub const TYPE: StructureType = StructureType::INSTANCE_PROPERTIES; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -3167,6 +3179,9 @@ pub struct SystemGetInfo { } impl SystemGetInfo { pub const TYPE: StructureType = StructureType::SYSTEM_GET_INFO; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3182,6 +3197,9 @@ pub struct SystemProperties { } impl SystemProperties { pub const TYPE: StructureType = StructureType::SYSTEM_PROPERTIES; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -3223,6 +3241,9 @@ pub struct GraphicsBindingOpenGLWin32KHR { #[cfg(windows)] impl GraphicsBindingOpenGLWin32KHR { pub const TYPE: StructureType = StructureType::GRAPHICS_BINDING_OPENGL_WIN32_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3238,6 +3259,9 @@ pub struct GraphicsBindingOpenGLXlibKHR { } impl GraphicsBindingOpenGLXlibKHR { pub const TYPE: StructureType = StructureType::GRAPHICS_BINDING_OPENGL_XLIB_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3254,6 +3278,9 @@ pub struct GraphicsBindingOpenGLXcbKHR { } impl GraphicsBindingOpenGLXcbKHR { pub const TYPE: StructureType = StructureType::GRAPHICS_BINDING_OPENGL_XCB_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3265,6 +3292,9 @@ pub struct GraphicsBindingOpenGLWaylandKHR { } impl GraphicsBindingOpenGLWaylandKHR { pub const TYPE: StructureType = StructureType::GRAPHICS_BINDING_OPENGL_WAYLAND_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3278,6 +3308,9 @@ pub struct GraphicsBindingD3D11KHR { #[cfg(windows)] impl GraphicsBindingD3D11KHR { pub const TYPE: StructureType = StructureType::GRAPHICS_BINDING_D3D11_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3292,6 +3325,9 @@ pub struct GraphicsBindingD3D12KHR { #[cfg(windows)] impl GraphicsBindingD3D12KHR { pub const TYPE: StructureType = StructureType::GRAPHICS_BINDING_D3D12_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3307,6 +3343,9 @@ pub struct GraphicsBindingOpenGLESAndroidKHR { #[cfg(target_os = "android")] impl GraphicsBindingOpenGLESAndroidKHR { pub const TYPE: StructureType = StructureType::GRAPHICS_BINDING_OPENGL_ES_ANDROID_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3322,6 +3361,9 @@ pub struct GraphicsBindingVulkanKHR { } impl GraphicsBindingVulkanKHR { pub const TYPE: StructureType = StructureType::GRAPHICS_BINDING_VULKAN_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3334,6 +3376,9 @@ pub struct SessionCreateInfo { } impl SessionCreateInfo { pub const TYPE: StructureType = StructureType::SESSION_CREATE_INFO; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3345,6 +3390,9 @@ pub struct SessionBeginInfo { } impl SessionBeginInfo { pub const TYPE: StructureType = StructureType::SESSION_BEGIN_INFO; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3364,6 +3412,9 @@ pub struct SwapchainCreateInfo { } impl SwapchainCreateInfo { pub const TYPE: StructureType = StructureType::SWAPCHAIN_CREATE_INFO; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3382,6 +3433,9 @@ pub struct SwapchainImageOpenGLKHR { } impl SwapchainImageOpenGLKHR { pub const TYPE: StructureType = StructureType::SWAPCHAIN_IMAGE_OPENGL_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -3405,6 +3459,9 @@ pub struct SwapchainImageOpenGLESKHR { } impl SwapchainImageOpenGLESKHR { pub const TYPE: StructureType = StructureType::SWAPCHAIN_IMAGE_OPENGL_ES_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -3428,6 +3485,9 @@ pub struct SwapchainImageVulkanKHR { } impl SwapchainImageVulkanKHR { pub const TYPE: StructureType = StructureType::SWAPCHAIN_IMAGE_VULKAN_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -3453,6 +3513,9 @@ pub struct SwapchainImageD3D11KHR { #[cfg(windows)] impl SwapchainImageD3D11KHR { pub const TYPE: StructureType = StructureType::SWAPCHAIN_IMAGE_D3D11_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -3478,6 +3541,9 @@ pub struct SwapchainImageD3D12KHR { #[cfg(windows)] impl SwapchainImageD3D12KHR { pub const TYPE: StructureType = StructureType::SWAPCHAIN_IMAGE_D3D12_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -3500,6 +3566,9 @@ pub struct SwapchainImageAcquireInfo { } impl SwapchainImageAcquireInfo { pub const TYPE: StructureType = StructureType::SWAPCHAIN_IMAGE_ACQUIRE_INFO; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3511,6 +3580,9 @@ pub struct SwapchainImageWaitInfo { } impl SwapchainImageWaitInfo { pub const TYPE: StructureType = StructureType::SWAPCHAIN_IMAGE_WAIT_INFO; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3521,6 +3593,9 @@ pub struct SwapchainImageReleaseInfo { } impl SwapchainImageReleaseInfo { pub const TYPE: StructureType = StructureType::SWAPCHAIN_IMAGE_RELEASE_INFO; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3533,6 +3608,9 @@ pub struct ReferenceSpaceCreateInfo { } impl ReferenceSpaceCreateInfo { pub const TYPE: StructureType = StructureType::REFERENCE_SPACE_CREATE_INFO; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3546,6 +3624,9 @@ pub struct ActionSpaceCreateInfo { } impl ActionSpaceCreateInfo { pub const TYPE: StructureType = StructureType::ACTION_SPACE_CREATE_INFO; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3558,6 +3639,9 @@ pub struct SpaceLocation { } impl SpaceLocation { pub const TYPE: StructureType = StructureType::SPACE_LOCATION; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -3583,6 +3667,9 @@ pub struct SpaceVelocity { } impl SpaceVelocity { pub const TYPE: StructureType = StructureType::SPACE_VELOCITY; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -3616,6 +3703,9 @@ pub struct View { } impl View { pub const TYPE: StructureType = StructureType::VIEW; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -3641,6 +3731,9 @@ pub struct ViewLocateInfo { } impl ViewLocateInfo { pub const TYPE: StructureType = StructureType::VIEW_LOCATE_INFO; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3652,6 +3745,9 @@ pub struct ViewState { } impl ViewState { pub const TYPE: StructureType = StructureType::VIEW_STATE; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -3680,6 +3776,9 @@ pub struct ViewConfigurationView { } impl ViewConfigurationView { pub const TYPE: StructureType = StructureType::VIEW_CONFIGURATION_VIEW; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -3722,6 +3821,9 @@ pub struct CompositionLayerProjectionView { } impl CompositionLayerProjectionView { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_PROJECTION_VIEW; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3736,6 +3838,9 @@ pub struct CompositionLayerProjection { } impl CompositionLayerProjection { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_PROJECTION; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3752,6 +3857,9 @@ pub struct CompositionLayerQuad { } impl CompositionLayerQuad { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_QUAD; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3770,6 +3878,9 @@ pub struct CompositionLayerCylinderKHR { } impl CompositionLayerCylinderKHR { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_CYLINDER_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3786,6 +3897,9 @@ pub struct CompositionLayerCubeKHR { } impl CompositionLayerCubeKHR { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_CUBE_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3804,6 +3918,9 @@ pub struct CompositionLayerEquirectKHR { } impl CompositionLayerEquirectKHR { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_EQUIRECT_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3819,6 +3936,9 @@ pub struct CompositionLayerDepthInfoKHR { } impl CompositionLayerDepthInfoKHR { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_DEPTH_INFO_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3829,6 +3949,9 @@ pub struct FrameBeginInfo { } impl FrameBeginInfo { pub const TYPE: StructureType = StructureType::FRAME_BEGIN_INFO; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3843,6 +3966,9 @@ pub struct FrameEndInfo { } impl FrameEndInfo { pub const TYPE: StructureType = StructureType::FRAME_END_INFO; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3853,6 +3979,9 @@ pub struct FrameWaitInfo { } impl FrameWaitInfo { pub const TYPE: StructureType = StructureType::FRAME_WAIT_INFO; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3866,6 +3995,9 @@ pub struct FrameState { } impl FrameState { pub const TYPE: StructureType = StructureType::FRAME_STATE; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -3898,6 +4030,9 @@ pub struct HapticVibration { } impl HapticVibration { pub const TYPE: StructureType = StructureType::HAPTIC_VIBRATION; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3916,6 +4051,9 @@ pub struct EventDataBuffer { } impl EventDataBuffer { pub const TYPE: StructureType = StructureType::EVENT_DATA_BUFFER; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3927,6 +4065,9 @@ pub struct EventDataEventsLost { } impl EventDataEventsLost { pub const TYPE: StructureType = StructureType::EVENT_DATA_EVENTS_LOST; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3938,6 +4079,9 @@ pub struct EventDataInstanceLossPending { } impl EventDataInstanceLossPending { pub const TYPE: StructureType = StructureType::EVENT_DATA_INSTANCE_LOSS_PENDING; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3951,6 +4095,9 @@ pub struct EventDataSessionStateChanged { } impl EventDataSessionStateChanged { pub const TYPE: StructureType = StructureType::EVENT_DATA_SESSION_STATE_CHANGED; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3966,6 +4113,9 @@ pub struct EventDataReferenceSpaceChangePending { } impl EventDataReferenceSpaceChangePending { pub const TYPE: StructureType = StructureType::EVENT_DATA_REFERENCE_SPACE_CHANGE_PENDING; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3980,6 +4130,9 @@ pub struct EventDataPerfSettingsEXT { } impl EventDataPerfSettingsEXT { pub const TYPE: StructureType = StructureType::EVENT_DATA_PERF_SETTINGS_EXT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3993,6 +4146,9 @@ pub struct EventDataVisibilityMaskChangedKHR { } impl EventDataVisibilityMaskChangedKHR { pub const TYPE: StructureType = StructureType::EVENT_DATA_VISIBILITY_MASK_CHANGED_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4005,6 +4161,9 @@ pub struct ViewConfigurationProperties { } impl ViewConfigurationProperties { pub const TYPE: StructureType = StructureType::VIEW_CONFIGURATION_PROPERTIES; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4031,6 +4190,9 @@ pub struct ActionStateBoolean { } impl ActionStateBoolean { pub const TYPE: StructureType = StructureType::ACTION_STATE_BOOLEAN; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4057,6 +4219,9 @@ pub struct ActionStateFloat { } impl ActionStateFloat { pub const TYPE: StructureType = StructureType::ACTION_STATE_FLOAT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4083,6 +4248,9 @@ pub struct ActionStateVector2f { } impl ActionStateVector2f { pub const TYPE: StructureType = StructureType::ACTION_STATE_VECTOR2F; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4106,6 +4274,9 @@ pub struct ActionStatePose { } impl ActionStatePose { pub const TYPE: StructureType = StructureType::ACTION_STATE_POSE; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4130,6 +4301,9 @@ pub struct ActionStateGetInfo { } impl ActionStateGetInfo { pub const TYPE: StructureType = StructureType::ACTION_STATE_GET_INFO; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4142,6 +4316,9 @@ pub struct HapticActionInfo { } impl HapticActionInfo { pub const TYPE: StructureType = StructureType::HAPTIC_ACTION_INFO; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4155,6 +4332,9 @@ pub struct ActionSetCreateInfo { } impl ActionSetCreateInfo { pub const TYPE: StructureType = StructureType::ACTION_SET_CREATE_INFO; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4175,6 +4355,9 @@ pub struct InteractionProfileSuggestedBinding { } impl InteractionProfileSuggestedBinding { pub const TYPE: StructureType = StructureType::INTERACTION_PROFILE_SUGGESTED_BINDING; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4194,6 +4377,9 @@ pub struct SessionActionSetsAttachInfo { } impl SessionActionSetsAttachInfo { pub const TYPE: StructureType = StructureType::SESSION_ACTION_SETS_ATTACH_INFO; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4206,6 +4392,9 @@ pub struct ActionsSyncInfo { } impl ActionsSyncInfo { pub const TYPE: StructureType = StructureType::ACTIONS_SYNC_INFO; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4217,6 +4406,9 @@ pub struct BoundSourcesForActionEnumerateInfo { } impl BoundSourcesForActionEnumerateInfo { pub const TYPE: StructureType = StructureType::BOUND_SOURCES_FOR_ACTION_ENUMERATE_INFO; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4229,6 +4421,9 @@ pub struct InputSourceLocalizedNameGetInfo { } impl InputSourceLocalizedNameGetInfo { pub const TYPE: StructureType = StructureType::INPUT_SOURCE_LOCALIZED_NAME_GET_INFO; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4240,6 +4435,9 @@ pub struct EventDataInteractionProfileChanged { } impl EventDataInteractionProfileChanged { pub const TYPE: StructureType = StructureType::EVENT_DATA_INTERACTION_PROFILE_CHANGED; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4251,6 +4449,9 @@ pub struct InteractionProfileState { } impl InteractionProfileState { pub const TYPE: StructureType = StructureType::INTERACTION_PROFILE_STATE; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4278,6 +4479,9 @@ pub struct ActionCreateInfo { } impl ActionCreateInfo { pub const TYPE: StructureType = StructureType::ACTION_CREATE_INFO; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4292,6 +4496,9 @@ pub struct InstanceCreateInfoAndroidKHR { #[cfg(target_os = "android")] impl InstanceCreateInfoAndroidKHR { pub const TYPE: StructureType = StructureType::INSTANCE_CREATE_INFO_ANDROID_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4304,6 +4511,9 @@ pub struct VulkanSwapchainFormatListCreateInfoKHR { } impl VulkanSwapchainFormatListCreateInfoKHR { pub const TYPE: StructureType = StructureType::VULKAN_SWAPCHAIN_FORMAT_LIST_CREATE_INFO_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4317,6 +4527,9 @@ pub struct DebugUtilsObjectNameInfoEXT { } impl DebugUtilsObjectNameInfoEXT { pub const TYPE: StructureType = StructureType::DEBUG_UTILS_OBJECT_NAME_INFO_EXT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4328,6 +4541,9 @@ pub struct DebugUtilsLabelEXT { } impl DebugUtilsLabelEXT { pub const TYPE: StructureType = StructureType::DEBUG_UTILS_LABEL_EXT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4345,6 +4561,9 @@ pub struct DebugUtilsMessengerCallbackDataEXT { } impl DebugUtilsMessengerCallbackDataEXT { pub const TYPE: StructureType = StructureType::DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone)] @@ -4359,6 +4578,9 @@ pub struct DebugUtilsMessengerCreateInfoEXT { } impl DebugUtilsMessengerCreateInfoEXT { pub const TYPE: StructureType = StructureType::DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4375,6 +4597,9 @@ pub struct VisibilityMaskKHR { } impl VisibilityMaskKHR { pub const TYPE: StructureType = StructureType::VISIBILITY_MASK_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4399,6 +4624,9 @@ pub struct GraphicsRequirementsOpenGLKHR { } impl GraphicsRequirementsOpenGLKHR { pub const TYPE: StructureType = StructureType::GRAPHICS_REQUIREMENTS_OPENGL_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4423,6 +4651,9 @@ pub struct GraphicsRequirementsOpenGLESKHR { } impl GraphicsRequirementsOpenGLESKHR { pub const TYPE: StructureType = StructureType::GRAPHICS_REQUIREMENTS_OPENGL_ES_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4447,6 +4678,9 @@ pub struct GraphicsRequirementsVulkanKHR { } impl GraphicsRequirementsVulkanKHR { pub const TYPE: StructureType = StructureType::GRAPHICS_REQUIREMENTS_VULKAN_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4473,6 +4707,9 @@ pub struct GraphicsRequirementsD3D11KHR { #[cfg(windows)] impl GraphicsRequirementsD3D11KHR { pub const TYPE: StructureType = StructureType::GRAPHICS_REQUIREMENTS_D3D11_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4499,6 +4736,9 @@ pub struct GraphicsRequirementsD3D12KHR { #[cfg(windows)] impl GraphicsRequirementsD3D12KHR { pub const TYPE: StructureType = StructureType::GRAPHICS_REQUIREMENTS_D3D12_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4526,6 +4766,9 @@ pub struct VulkanInstanceCreateInfoKHR { } impl VulkanInstanceCreateInfoKHR { pub const TYPE: StructureType = StructureType::VULKAN_INSTANCE_CREATE_INFO_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone)] @@ -4542,6 +4785,9 @@ pub struct VulkanDeviceCreateInfoKHR { } impl VulkanDeviceCreateInfoKHR { pub const TYPE: StructureType = StructureType::VULKAN_DEVICE_CREATE_INFO_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4554,6 +4800,9 @@ pub struct VulkanGraphicsDeviceGetInfoKHR { } impl VulkanGraphicsDeviceGetInfoKHR { pub const TYPE: StructureType = StructureType::VULKAN_GRAPHICS_DEVICE_GET_INFO_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4566,6 +4815,9 @@ pub struct VulkanSwapchainCreateInfoMETA { } impl VulkanSwapchainCreateInfoMETA { pub const TYPE: StructureType = StructureType::VULKAN_SWAPCHAIN_CREATE_INFO_META; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4578,6 +4830,9 @@ pub struct SessionCreateInfoOverlayEXTX { } impl SessionCreateInfoOverlayEXTX { pub const TYPE: StructureType = StructureType::SESSION_CREATE_INFO_OVERLAY_EXTX; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4590,6 +4845,9 @@ pub struct EventDataMainSessionVisibilityChangedEXTX { } impl EventDataMainSessionVisibilityChangedEXTX { pub const TYPE: StructureType = StructureType::EVENT_DATA_MAIN_SESSION_VISIBILITY_CHANGED_EXTX; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4602,6 +4860,9 @@ pub struct EventDataDisplayRefreshRateChangedFB { } impl EventDataDisplayRefreshRateChangedFB { pub const TYPE: StructureType = StructureType::EVENT_DATA_DISPLAY_REFRESH_RATE_CHANGED_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4616,6 +4877,9 @@ pub struct ViewConfigurationDepthRangeEXT { } impl ViewConfigurationDepthRangeEXT { pub const TYPE: StructureType = StructureType::VIEW_CONFIGURATION_DEPTH_RANGE_EXT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4640,6 +4904,9 @@ pub struct ViewConfigurationViewFovEPIC { } impl ViewConfigurationViewFovEPIC { pub const TYPE: StructureType = StructureType::VIEW_CONFIGURATION_VIEW_FOV_EPIC; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4659,6 +4926,9 @@ pub struct InteractionProfileDpadBindingEXT { } impl InteractionProfileDpadBindingEXT { pub const TYPE: StructureType = StructureType::INTERACTION_PROFILE_DPAD_BINDING_EXT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4675,6 +4945,9 @@ pub struct InteractionProfileAnalogThresholdVALVE { } impl InteractionProfileAnalogThresholdVALVE { pub const TYPE: StructureType = StructureType::INTERACTION_PROFILE_ANALOG_THRESHOLD_VALVE; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4687,6 +4960,9 @@ pub struct BindingModificationsKHR { } impl BindingModificationsKHR { pub const TYPE: StructureType = StructureType::BINDING_MODIFICATIONS_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4705,6 +4981,9 @@ pub struct SystemEyeGazeInteractionPropertiesEXT { } impl SystemEyeGazeInteractionPropertiesEXT { pub const TYPE: StructureType = StructureType::SYSTEM_EYE_GAZE_INTERACTION_PROPERTIES_EXT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4728,6 +5007,9 @@ pub struct EyeGazeSampleTimeEXT { } impl EyeGazeSampleTimeEXT { pub const TYPE: StructureType = StructureType::EYE_GAZE_SAMPLE_TIME_EXT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4753,6 +5035,9 @@ pub struct SpatialAnchorCreateInfoMSFT { } impl SpatialAnchorCreateInfoMSFT { pub const TYPE: StructureType = StructureType::SPATIAL_ANCHOR_CREATE_INFO_MSFT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4765,6 +5050,9 @@ pub struct SpatialAnchorSpaceCreateInfoMSFT { } impl SpatialAnchorSpaceCreateInfoMSFT { pub const TYPE: StructureType = StructureType::SPATIAL_ANCHOR_SPACE_CREATE_INFO_MSFT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4776,6 +5064,9 @@ pub struct CompositionLayerImageLayoutFB { } impl CompositionLayerImageLayoutFB { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_IMAGE_LAYOUT_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4802,6 +5093,9 @@ pub struct CompositionLayerAlphaBlendFB { } impl CompositionLayerAlphaBlendFB { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_ALPHA_BLEND_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4828,6 +5122,9 @@ pub struct GraphicsBindingEGLMNDX { } impl GraphicsBindingEGLMNDX { pub const TYPE: StructureType = StructureType::GRAPHICS_BINDING_EGL_MNDX; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4841,6 +5138,9 @@ pub struct SpatialGraphNodeSpaceCreateInfoMSFT { } impl SpatialGraphNodeSpaceCreateInfoMSFT { pub const TYPE: StructureType = StructureType::SPATIAL_GRAPH_NODE_SPACE_CREATE_INFO_MSFT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4855,6 +5155,9 @@ pub struct SpatialGraphStaticNodeBindingCreateInfoMSFT { impl SpatialGraphStaticNodeBindingCreateInfoMSFT { pub const TYPE: StructureType = StructureType::SPATIAL_GRAPH_STATIC_NODE_BINDING_CREATE_INFO_MSFT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4866,6 +5169,9 @@ pub struct SpatialGraphNodeBindingPropertiesGetInfoMSFT { impl SpatialGraphNodeBindingPropertiesGetInfoMSFT { pub const TYPE: StructureType = StructureType::SPATIAL_GRAPH_NODE_BINDING_PROPERTIES_GET_INFO_MSFT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4878,6 +5184,9 @@ pub struct SpatialGraphNodeBindingPropertiesMSFT { } impl SpatialGraphNodeBindingPropertiesMSFT { pub const TYPE: StructureType = StructureType::SPATIAL_GRAPH_NODE_BINDING_PROPERTIES_MSFT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4901,6 +5210,9 @@ pub struct SystemHandTrackingPropertiesEXT { } impl SystemHandTrackingPropertiesEXT { pub const TYPE: StructureType = StructureType::SYSTEM_HAND_TRACKING_PROPERTIES_EXT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4925,6 +5237,9 @@ pub struct HandTrackerCreateInfoEXT { } impl HandTrackerCreateInfoEXT { pub const TYPE: StructureType = StructureType::HAND_TRACKER_CREATE_INFO_EXT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4937,6 +5252,9 @@ pub struct HandJointsLocateInfoEXT { } impl HandJointsLocateInfoEXT { pub const TYPE: StructureType = StructureType::HAND_JOINTS_LOCATE_INFO_EXT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug, Default, PartialEq)] @@ -4966,6 +5284,9 @@ pub struct HandJointLocationsEXT { } impl HandJointLocationsEXT { pub const TYPE: StructureType = StructureType::HAND_JOINT_LOCATIONS_EXT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4990,6 +5311,9 @@ pub struct HandJointVelocitiesEXT { } impl HandJointVelocitiesEXT { pub const TYPE: StructureType = StructureType::HAND_JOINT_VELOCITIES_EXT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5013,6 +5337,9 @@ pub struct HandJointsMotionRangeInfoEXT { } impl HandJointsMotionRangeInfoEXT { pub const TYPE: StructureType = StructureType::HAND_JOINTS_MOTION_RANGE_INFO_EXT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5025,6 +5352,9 @@ pub struct HandMeshSpaceCreateInfoMSFT { } impl HandMeshSpaceCreateInfoMSFT { pub const TYPE: StructureType = StructureType::HAND_MESH_SPACE_CREATE_INFO_MSFT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5037,6 +5367,9 @@ pub struct HandMeshUpdateInfoMSFT { } impl HandMeshUpdateInfoMSFT { pub const TYPE: StructureType = StructureType::HAND_MESH_UPDATE_INFO_MSFT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5052,6 +5385,9 @@ pub struct HandMeshMSFT { } impl HandMeshMSFT { pub const TYPE: StructureType = StructureType::HAND_MESH_MSFT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5102,6 +5438,9 @@ pub struct SystemHandTrackingMeshPropertiesMSFT { } impl SystemHandTrackingMeshPropertiesMSFT { pub const TYPE: StructureType = StructureType::SYSTEM_HAND_TRACKING_MESH_PROPERTIES_MSFT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5125,6 +5464,9 @@ pub struct HandPoseTypeInfoMSFT { } impl HandPoseTypeInfoMSFT { pub const TYPE: StructureType = StructureType::HAND_POSE_TYPE_INFO_MSFT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5138,6 +5480,9 @@ pub struct SecondaryViewConfigurationSessionBeginInfoMSFT { impl SecondaryViewConfigurationSessionBeginInfoMSFT { pub const TYPE: StructureType = StructureType::SECONDARY_VIEW_CONFIGURATION_SESSION_BEGIN_INFO_MSFT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5150,6 +5495,9 @@ pub struct SecondaryViewConfigurationStateMSFT { } impl SecondaryViewConfigurationStateMSFT { pub const TYPE: StructureType = StructureType::SECONDARY_VIEW_CONFIGURATION_STATE_MSFT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5174,6 +5522,9 @@ pub struct SecondaryViewConfigurationFrameStateMSFT { } impl SecondaryViewConfigurationFrameStateMSFT { pub const TYPE: StructureType = StructureType::SECONDARY_VIEW_CONFIGURATION_FRAME_STATE_MSFT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5198,6 +5549,9 @@ pub struct SecondaryViewConfigurationFrameEndInfoMSFT { } impl SecondaryViewConfigurationFrameEndInfoMSFT { pub const TYPE: StructureType = StructureType::SECONDARY_VIEW_CONFIGURATION_FRAME_END_INFO_MSFT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5212,6 +5566,9 @@ pub struct SecondaryViewConfigurationLayerInfoMSFT { } impl SecondaryViewConfigurationLayerInfoMSFT { pub const TYPE: StructureType = StructureType::SECONDARY_VIEW_CONFIGURATION_LAYER_INFO_MSFT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5224,6 +5581,9 @@ pub struct SecondaryViewConfigurationSwapchainCreateInfoMSFT { impl SecondaryViewConfigurationSwapchainCreateInfoMSFT { pub const TYPE: StructureType = StructureType::SECONDARY_VIEW_CONFIGURATION_SWAPCHAIN_CREATE_INFO_MSFT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5238,6 +5598,9 @@ pub struct HolographicWindowAttachmentMSFT { #[cfg(windows)] impl HolographicWindowAttachmentMSFT { pub const TYPE: StructureType = StructureType::HOLOGRAPHIC_WINDOW_ATTACHMENT_MSFT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5251,6 +5614,9 @@ pub struct AndroidSurfaceSwapchainCreateInfoFB { #[cfg(target_os = "android")] impl AndroidSurfaceSwapchainCreateInfoFB { pub const TYPE: StructureType = StructureType::ANDROID_SURFACE_SWAPCHAIN_CREATE_INFO_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5272,6 +5638,9 @@ pub struct SwapchainStateAndroidSurfaceDimensionsFB { #[cfg(target_os = "android")] impl SwapchainStateAndroidSurfaceDimensionsFB { pub const TYPE: StructureType = StructureType::SWAPCHAIN_STATE_ANDROID_SURFACE_DIMENSIONS_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5304,6 +5673,9 @@ pub struct SwapchainStateSamplerOpenGLESFB { } impl SwapchainStateSamplerOpenGLESFB { pub const TYPE: StructureType = StructureType::SWAPCHAIN_STATE_SAMPLER_OPENGL_ES_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5337,6 +5709,9 @@ pub struct SwapchainStateSamplerVulkanFB { } impl SwapchainStateSamplerVulkanFB { pub const TYPE: StructureType = StructureType::SWAPCHAIN_STATE_SAMPLER_VULKAN_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5360,6 +5735,9 @@ pub struct CompositionLayerSecureContentFB { } impl CompositionLayerSecureContentFB { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_SECURE_CONTENT_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5381,6 +5759,9 @@ pub struct LoaderInitInfoAndroidKHR { #[cfg(target_os = "android")] impl LoaderInitInfoAndroidKHR { pub const TYPE: StructureType = StructureType::LOADER_INIT_INFO_ANDROID_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5400,6 +5781,9 @@ pub struct CompositionLayerEquirect2KHR { } impl CompositionLayerEquirect2KHR { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_EQUIRECT2_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5412,6 +5796,9 @@ pub struct CompositionLayerColorScaleBiasKHR { } impl CompositionLayerColorScaleBiasKHR { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_COLOR_SCALE_BIAS_KHR; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5423,6 +5810,9 @@ pub struct ControllerModelKeyStateMSFT { } impl ControllerModelKeyStateMSFT { pub const TYPE: StructureType = StructureType::CONTROLLER_MODEL_KEY_STATE_MSFT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5447,6 +5837,9 @@ pub struct ControllerModelNodePropertiesMSFT { } impl ControllerModelNodePropertiesMSFT { pub const TYPE: StructureType = StructureType::CONTROLLER_MODEL_NODE_PROPERTIES_MSFT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5472,6 +5865,9 @@ pub struct ControllerModelPropertiesMSFT { } impl ControllerModelPropertiesMSFT { pub const TYPE: StructureType = StructureType::CONTROLLER_MODEL_PROPERTIES_MSFT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5495,6 +5891,9 @@ pub struct ControllerModelNodeStateMSFT { } impl ControllerModelNodeStateMSFT { pub const TYPE: StructureType = StructureType::CONTROLLER_MODEL_NODE_STATE_MSFT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5520,6 +5919,9 @@ pub struct ControllerModelStateMSFT { } impl ControllerModelStateMSFT { pub const TYPE: StructureType = StructureType::CONTROLLER_MODEL_STATE_MSFT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5543,6 +5945,9 @@ pub struct SystemColorSpacePropertiesFB { } impl SystemColorSpacePropertiesFB { pub const TYPE: StructureType = StructureType::SYSTEM_COLOR_SPACE_PROPERTIES_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5566,6 +5971,9 @@ pub struct SystemSpatialEntityPropertiesFB { } impl SystemSpatialEntityPropertiesFB { pub const TYPE: StructureType = StructureType::SYSTEM_SPATIAL_ENTITY_PROPERTIES_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5579,6 +5987,9 @@ pub struct SpatialAnchorCreateInfoFB { } impl SpatialAnchorCreateInfoFB { pub const TYPE: StructureType = StructureType::SPATIAL_ANCHOR_CREATE_INFO_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5592,6 +6003,9 @@ pub struct SpaceComponentStatusSetInfoFB { } impl SpaceComponentStatusSetInfoFB { pub const TYPE: StructureType = StructureType::SPACE_COMPONENT_STATUS_SET_INFO_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5604,6 +6018,9 @@ pub struct SpaceComponentStatusFB { } impl SpaceComponentStatusFB { pub const TYPE: StructureType = StructureType::SPACE_COMPONENT_STATUS_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5630,6 +6047,9 @@ pub struct EventDataSpatialAnchorCreateCompleteFB { } impl EventDataSpatialAnchorCreateCompleteFB { pub const TYPE: StructureType = StructureType::EVENT_DATA_SPATIAL_ANCHOR_CREATE_COMPLETE_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5646,6 +6066,9 @@ pub struct EventDataSpaceSetStatusCompleteFB { } impl EventDataSpaceSetStatusCompleteFB { pub const TYPE: StructureType = StructureType::EVENT_DATA_SPACE_SET_STATUS_COMPLETE_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5656,6 +6079,9 @@ pub struct FoveationProfileCreateInfoFB { } impl FoveationProfileCreateInfoFB { pub const TYPE: StructureType = StructureType::FOVEATION_PROFILE_CREATE_INFO_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5679,6 +6105,9 @@ pub struct SwapchainCreateInfoFoveationFB { } impl SwapchainCreateInfoFoveationFB { pub const TYPE: StructureType = StructureType::SWAPCHAIN_CREATE_INFO_FOVEATION_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5703,6 +6132,9 @@ pub struct SwapchainStateFoveationFB { } impl SwapchainStateFoveationFB { pub const TYPE: StructureType = StructureType::SWAPCHAIN_STATE_FOVEATION_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5728,6 +6160,9 @@ pub struct SwapchainImageFoveationVulkanFB { } impl SwapchainImageFoveationVulkanFB { pub const TYPE: StructureType = StructureType::SWAPCHAIN_IMAGE_FOVEATION_VULKAN_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5753,6 +6188,9 @@ pub struct FoveationLevelProfileCreateInfoFB { } impl FoveationLevelProfileCreateInfoFB { pub const TYPE: StructureType = StructureType::FOVEATION_LEVEL_PROFILE_CREATE_INFO_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5799,6 +6237,9 @@ pub struct HandTrackingMeshFB { } impl HandTrackingMeshFB { pub const TYPE: StructureType = StructureType::HAND_TRACKING_MESH_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5825,6 +6266,9 @@ pub struct HandTrackingScaleFB { } impl HandTrackingScaleFB { pub const TYPE: StructureType = StructureType::HAND_TRACKING_SCALE_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5853,6 +6297,9 @@ pub struct HandTrackingAimStateFB { } impl HandTrackingAimStateFB { pub const TYPE: StructureType = StructureType::HAND_TRACKING_AIM_STATE_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5884,6 +6331,9 @@ pub struct HandTrackingCapsulesStateFB { } impl HandTrackingCapsulesStateFB { pub const TYPE: StructureType = StructureType::HAND_TRACKING_CAPSULES_STATE_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5907,6 +6357,9 @@ pub struct RenderModelPathInfoFB { } impl RenderModelPathInfoFB { pub const TYPE: StructureType = StructureType::RENDER_MODEL_PATH_INFO_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5934,6 +6387,9 @@ pub struct RenderModelPropertiesFB { } impl RenderModelPropertiesFB { pub const TYPE: StructureType = StructureType::RENDER_MODEL_PROPERTIES_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5959,6 +6415,9 @@ pub struct RenderModelBufferFB { } impl RenderModelBufferFB { pub const TYPE: StructureType = StructureType::RENDER_MODEL_BUFFER_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5982,6 +6441,9 @@ pub struct RenderModelLoadInfoFB { } impl RenderModelLoadInfoFB { pub const TYPE: StructureType = StructureType::RENDER_MODEL_LOAD_INFO_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6005,6 +6467,9 @@ pub struct SystemRenderModelPropertiesFB { } impl SystemRenderModelPropertiesFB { pub const TYPE: StructureType = StructureType::SYSTEM_RENDER_MODEL_PROPERTIES_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6028,6 +6493,9 @@ pub struct RenderModelCapabilitiesRequestFB { } impl RenderModelCapabilitiesRequestFB { pub const TYPE: StructureType = StructureType::RENDER_MODEL_CAPABILITIES_REQUEST_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6069,6 +6537,9 @@ pub struct SpaceQueryInfoFB { } impl SpaceQueryInfoFB { pub const TYPE: StructureType = StructureType::SPACE_QUERY_INFO_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6080,6 +6551,9 @@ pub struct SpaceStorageLocationFilterInfoFB { } impl SpaceStorageLocationFilterInfoFB { pub const TYPE: StructureType = StructureType::SPACE_STORAGE_LOCATION_FILTER_INFO_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6092,6 +6566,9 @@ pub struct SpaceUuidFilterInfoFB { } impl SpaceUuidFilterInfoFB { pub const TYPE: StructureType = StructureType::SPACE_UUID_FILTER_INFO_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6103,6 +6580,9 @@ pub struct SpaceComponentFilterInfoFB { } impl SpaceComponentFilterInfoFB { pub const TYPE: StructureType = StructureType::SPACE_COMPONENT_FILTER_INFO_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6123,6 +6603,9 @@ pub struct SpaceQueryResultsFB { } impl SpaceQueryResultsFB { pub const TYPE: StructureType = StructureType::SPACE_QUERY_RESULTS_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6146,6 +6629,9 @@ pub struct EventDataSpaceQueryResultsAvailableFB { } impl EventDataSpaceQueryResultsAvailableFB { pub const TYPE: StructureType = StructureType::EVENT_DATA_SPACE_QUERY_RESULTS_AVAILABLE_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6158,6 +6644,9 @@ pub struct EventDataSpaceQueryCompleteFB { } impl EventDataSpaceQueryCompleteFB { pub const TYPE: StructureType = StructureType::EVENT_DATA_SPACE_QUERY_COMPLETE_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6171,6 +6660,9 @@ pub struct SpaceSaveInfoFB { } impl SpaceSaveInfoFB { pub const TYPE: StructureType = StructureType::SPACE_SAVE_INFO_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6183,6 +6675,9 @@ pub struct SpaceEraseInfoFB { } impl SpaceEraseInfoFB { pub const TYPE: StructureType = StructureType::SPACE_ERASE_INFO_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6198,6 +6693,9 @@ pub struct EventDataSpaceSaveCompleteFB { } impl EventDataSpaceSaveCompleteFB { pub const TYPE: StructureType = StructureType::EVENT_DATA_SPACE_SAVE_COMPLETE_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6213,6 +6711,9 @@ pub struct EventDataSpaceEraseCompleteFB { } impl EventDataSpaceEraseCompleteFB { pub const TYPE: StructureType = StructureType::EVENT_DATA_SPACE_ERASE_COMPLETE_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6226,6 +6727,9 @@ pub struct SpaceContainerFB { } impl SpaceContainerFB { pub const TYPE: StructureType = StructureType::SPACE_CONTAINER_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug, Default, PartialEq)] @@ -6262,6 +6766,9 @@ pub struct SemanticLabelsFB { } impl SemanticLabelsFB { pub const TYPE: StructureType = StructureType::SEMANTIC_LABELS_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6277,6 +6784,9 @@ pub struct RoomLayoutFB { } impl RoomLayoutFB { pub const TYPE: StructureType = StructureType::ROOM_LAYOUT_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6290,6 +6800,9 @@ pub struct Boundary2DFB { } impl Boundary2DFB { pub const TYPE: StructureType = StructureType::BOUNDARY_2D_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6301,6 +6814,9 @@ pub struct SystemKeyboardTrackingPropertiesFB { } impl SystemKeyboardTrackingPropertiesFB { pub const TYPE: StructureType = StructureType::SYSTEM_KEYBOARD_TRACKING_PROPERTIES_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6333,6 +6849,9 @@ pub struct KeyboardSpaceCreateInfoFB { } impl KeyboardSpaceCreateInfoFB { pub const TYPE: StructureType = StructureType::KEYBOARD_SPACE_CREATE_INFO_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6356,6 +6875,9 @@ pub struct KeyboardTrackingQueryFB { } impl KeyboardTrackingQueryFB { pub const TYPE: StructureType = StructureType::KEYBOARD_TRACKING_QUERY_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6380,6 +6902,9 @@ pub struct CompositionLayerDepthTestVARJO { } impl CompositionLayerDepthTestVARJO { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_DEPTH_TEST_VARJO; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6391,6 +6916,9 @@ pub struct ViewLocateFoveatedRenderingVARJO { } impl ViewLocateFoveatedRenderingVARJO { pub const TYPE: StructureType = StructureType::VIEW_LOCATE_FOVEATED_RENDERING_VARJO; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6402,6 +6930,9 @@ pub struct FoveatedViewConfigurationViewVARJO { } impl FoveatedViewConfigurationViewVARJO { pub const TYPE: StructureType = StructureType::FOVEATED_VIEW_CONFIGURATION_VIEW_VARJO; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6425,6 +6956,9 @@ pub struct SystemFoveatedRenderingPropertiesVARJO { } impl SystemFoveatedRenderingPropertiesVARJO { pub const TYPE: StructureType = StructureType::SYSTEM_FOVEATED_RENDERING_PROPERTIES_VARJO; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6448,6 +6982,9 @@ pub struct CompositionLayerReprojectionInfoMSFT { } impl CompositionLayerReprojectionInfoMSFT { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_REPROJECTION_INFO_MSFT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6462,6 +6999,9 @@ pub struct CompositionLayerReprojectionPlaneOverrideMSFT { impl CompositionLayerReprojectionPlaneOverrideMSFT { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_REPROJECTION_PLANE_OVERRIDE_MSFT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6478,6 +7018,9 @@ pub struct TriangleMeshCreateInfoFB { } impl TriangleMeshCreateInfoFB { pub const TYPE: StructureType = StructureType::TRIANGLE_MESH_CREATE_INFO_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6489,6 +7032,9 @@ pub struct SystemPassthroughPropertiesFB { } impl SystemPassthroughPropertiesFB { pub const TYPE: StructureType = StructureType::SYSTEM_PASSTHROUGH_PROPERTIES_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6500,6 +7046,9 @@ pub struct SystemPassthroughProperties2FB { } impl SystemPassthroughProperties2FB { pub const TYPE: StructureType = StructureType::SYSTEM_PASSTHROUGH_PROPERTIES2_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6511,6 +7060,9 @@ pub struct PassthroughCreateInfoFB { } impl PassthroughCreateInfoFB { pub const TYPE: StructureType = StructureType::PASSTHROUGH_CREATE_INFO_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6524,6 +7076,9 @@ pub struct PassthroughLayerCreateInfoFB { } impl PassthroughLayerCreateInfoFB { pub const TYPE: StructureType = StructureType::PASSTHROUGH_LAYER_CREATE_INFO_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6537,6 +7092,9 @@ pub struct CompositionLayerPassthroughFB { } impl CompositionLayerPassthroughFB { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_PASSTHROUGH_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6552,6 +7110,9 @@ pub struct GeometryInstanceCreateInfoFB { } impl GeometryInstanceCreateInfoFB { pub const TYPE: StructureType = StructureType::GEOMETRY_INSTANCE_CREATE_INFO_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6566,6 +7127,9 @@ pub struct GeometryInstanceTransformFB { } impl GeometryInstanceTransformFB { pub const TYPE: StructureType = StructureType::GEOMETRY_INSTANCE_TRANSFORM_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6578,6 +7142,9 @@ pub struct PassthroughStyleFB { } impl PassthroughStyleFB { pub const TYPE: StructureType = StructureType::PASSTHROUGH_STYLE_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6589,6 +7156,9 @@ pub struct PassthroughColorMapMonoToRgbaFB { } impl PassthroughColorMapMonoToRgbaFB { pub const TYPE: StructureType = StructureType::PASSTHROUGH_COLOR_MAP_MONO_TO_RGBA_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6600,6 +7170,9 @@ pub struct PassthroughColorMapMonoToMonoFB { } impl PassthroughColorMapMonoToMonoFB { pub const TYPE: StructureType = StructureType::PASSTHROUGH_COLOR_MAP_MONO_TO_MONO_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6613,6 +7186,9 @@ pub struct PassthroughBrightnessContrastSaturationFB { } impl PassthroughBrightnessContrastSaturationFB { pub const TYPE: StructureType = StructureType::PASSTHROUGH_BRIGHTNESS_CONTRAST_SATURATION_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6624,6 +7200,9 @@ pub struct EventDataPassthroughStateChangedFB { } impl EventDataPassthroughStateChangedFB { pub const TYPE: StructureType = StructureType::EVENT_DATA_PASSTHROUGH_STATE_CHANGED_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6636,6 +7215,9 @@ pub struct PassthroughKeyboardHandsIntensityFB { } impl PassthroughKeyboardHandsIntensityFB { pub const TYPE: StructureType = StructureType::PASSTHROUGH_KEYBOARD_HANDS_INTENSITY_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6654,6 +7236,9 @@ pub struct SpatialAnchorPersistenceInfoMSFT { } impl SpatialAnchorPersistenceInfoMSFT { pub const TYPE: StructureType = StructureType::SPATIAL_ANCHOR_PERSISTENCE_INFO_MSFT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6667,6 +7252,9 @@ pub struct SpatialAnchorFromPersistedAnchorCreateInfoMSFT { impl SpatialAnchorFromPersistedAnchorCreateInfoMSFT { pub const TYPE: StructureType = StructureType::SPATIAL_ANCHOR_FROM_PERSISTED_ANCHOR_CREATE_INFO_MSFT; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6678,6 +7266,9 @@ pub struct FacialTrackerCreateInfoHTC { } impl FacialTrackerCreateInfoHTC { pub const TYPE: StructureType = StructureType::FACIAL_TRACKER_CREATE_INFO_HTC; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6690,6 +7281,9 @@ pub struct SystemFacialTrackingPropertiesHTC { } impl SystemFacialTrackingPropertiesHTC { pub const TYPE: StructureType = StructureType::SYSTEM_FACIAL_TRACKING_PROPERTIES_HTC; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6716,6 +7310,9 @@ pub struct FacialExpressionsHTC { } impl FacialExpressionsHTC { pub const TYPE: StructureType = StructureType::FACIAL_EXPRESSIONS_HTC; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6728,6 +7325,9 @@ pub struct ViveTrackerPathsHTCX { } impl ViveTrackerPathsHTCX { pub const TYPE: StructureType = StructureType::VIVE_TRACKER_PATHS_HTCX; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6751,6 +7351,9 @@ pub struct EventDataViveTrackerConnectedHTCX { } impl EventDataViveTrackerConnectedHTCX { pub const TYPE: StructureType = StructureType::EVENT_DATA_VIVE_TRACKER_CONNECTED_HTCX; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6769,6 +7372,9 @@ pub struct CompositionLayerSpaceWarpInfoFB { } impl CompositionLayerSpaceWarpInfoFB { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_SPACE_WARP_INFO_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6781,6 +7387,9 @@ pub struct SystemSpaceWarpPropertiesFB { } impl SystemSpaceWarpPropertiesFB { pub const TYPE: StructureType = StructureType::SYSTEM_SPACE_WARP_PROPERTIES_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6804,6 +7413,9 @@ pub struct SystemMarkerTrackingPropertiesVARJO { } impl SystemMarkerTrackingPropertiesVARJO { pub const TYPE: StructureType = StructureType::SYSTEM_MARKER_TRACKING_PROPERTIES_VARJO; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6830,6 +7442,9 @@ pub struct EventDataMarkerTrackingUpdateVARJO { } impl EventDataMarkerTrackingUpdateVARJO { pub const TYPE: StructureType = StructureType::EVENT_DATA_MARKER_TRACKING_UPDATE_VARJO; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6842,6 +7457,9 @@ pub struct MarkerSpaceCreateInfoVARJO { } impl MarkerSpaceCreateInfoVARJO { pub const TYPE: StructureType = StructureType::MARKER_SPACE_CREATE_INFO_VARJO; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6859,6 +7477,9 @@ pub struct DigitalLensControlALMALENCE { } impl DigitalLensControlALMALENCE { pub const TYPE: StructureType = StructureType::DIGITAL_LENS_CONTROL_ALMALENCE; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6870,6 +7491,9 @@ pub struct CompositionLayerSettingsFB { } impl CompositionLayerSettingsFB { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_SETTINGS_FB; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6881,6 +7505,9 @@ pub struct PerformanceMetricsStateMETA { } impl PerformanceMetricsStateMETA { pub const TYPE: StructureType = StructureType::PERFORMANCE_METRICS_STATE_META; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6895,6 +7522,9 @@ pub struct PerformanceMetricsCounterMETA { } impl PerformanceMetricsCounterMETA { pub const TYPE: StructureType = StructureType::PERFORMANCE_METRICS_COUNTER_META; + pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { + ptr_chain_iter(self) + } } #[doc = r" Function pointer prototypes"] pub mod pfn { diff --git a/sys/src/lib.rs b/sys/src/lib.rs index 0c8bf193..be220b19 100644 --- a/sys/src/lib.rs +++ b/sys/src/lib.rs @@ -220,3 +220,18 @@ impl std::ops::IndexMut for [T] { &mut self[joint.into_raw() as usize] } } + +/// Iterates through the pointer chain. Includes the item that is passed into the function. +/// Stops at the last [`BaseOutStructure`] that has a null [`BaseOutStructure::next`] field. +pub unsafe fn ptr_chain_iter(ptr: &mut T) -> impl Iterator { + let ptr = <*mut T>::cast::(ptr); + (0..).scan(ptr, |p_ptr, _| { + if p_ptr.is_null() { + return None; + } + let n_ptr = (**p_ptr).next; + let old = *p_ptr; + *p_ptr = n_ptr; + Some(old) + }) +} From eaf6f37fadfd67180d899d89d0adeb509f9c893f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacopo=20Lib=C3=A8?= Date: Thu, 25 May 2023 02:16:26 +0200 Subject: [PATCH 2/9] Add to exports --- openxr/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openxr/src/lib.rs b/openxr/src/lib.rs index 109bb52f..48ad85f7 100644 --- a/openxr/src/lib.rs +++ b/openxr/src/lib.rs @@ -44,7 +44,7 @@ pub use passthrough::*; pub use builder::{ CompositionLayerBase, CompositionLayerCubeKHR, CompositionLayerCylinderKHR, CompositionLayerEquirectKHR, CompositionLayerProjection, CompositionLayerProjectionView, - CompositionLayerQuad, HapticBase, HapticVibration, SwapchainSubImage, + CompositionLayerQuad, HapticBase, HapticVibration, SwapchainSubImage, CompositionLayerDepthInfoKHR }; pub type Result = std::result::Result; From aa2b7ef23ede7d380ca878ed901526d324aeb536 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacopo=20Lib=C3=A8?= Date: Fri, 26 May 2023 02:32:11 +0200 Subject: [PATCH 3/9] Add space warp info --- generator/src/main.rs | 1 + openxr/src/generated.rs | 88 +++++++++++++++++++++++++++++++++++++++++ openxr/src/lib.rs | 5 ++- 3 files changed, 92 insertions(+), 2 deletions(-) diff --git a/generator/src/main.rs b/generator/src/main.rs index 4e2ad889..0d012556 100644 --- a/generator/src/main.rs +++ b/generator/src/main.rs @@ -1473,6 +1473,7 @@ impl Parser { let whitelist = [ "XrCompositionLayerProjectionView", "XrCompositionLayerDepthInfoKHR", + "XrCompositionLayerSpaceWarpInfoFB", "XrSwapchainSubImage", "XrActionSetCreateInfo", "XrActionCreateInfo", diff --git a/openxr/src/generated.rs b/openxr/src/generated.rs index 690a7d90..1fc8836a 100644 --- a/openxr/src/generated.rs +++ b/openxr/src/generated.rs @@ -4721,6 +4721,94 @@ pub(crate) mod builder { Self::new() } } + #[derive(Copy, Clone)] + #[repr(transparent)] + pub struct CompositionLayerSpaceWarpInfoFB<'a, G: Graphics> { + inner: sys::CompositionLayerSpaceWarpInfoFB, + _marker: PhantomData<&'a G>, + } + impl<'a, G: Graphics> CompositionLayerSpaceWarpInfoFB<'a, G> { + #[inline] + pub fn new() -> Self { + Self { + inner: sys::CompositionLayerSpaceWarpInfoFB { + ty: sys::StructureType::COMPOSITION_LAYER_SPACE_WARP_INFO_FB, + ..unsafe { mem::zeroed() } + }, + _marker: PhantomData, + } + } + #[doc = r" Initialize with the supplied raw values"] + #[doc = r""] + #[doc = r" # Safety"] + #[doc = r""] + #[doc = r" The guarantees normally enforced by this builder (e.g. lifetimes) must be"] + #[doc = r" preserved."] + #[inline] + pub unsafe fn from_raw(inner: sys::CompositionLayerSpaceWarpInfoFB) -> Self { + Self { + inner, + _marker: PhantomData, + } + } + #[inline] + pub fn into_raw(self) -> sys::CompositionLayerSpaceWarpInfoFB { + self.inner + } + #[inline] + pub fn as_raw(&self) -> &sys::CompositionLayerSpaceWarpInfoFB { + &self.inner + } + #[inline] + pub fn layer_flags(mut self, value: CompositionLayerSpaceWarpInfoFlagsFB) -> Self { + self.inner.layer_flags = value; + self + } + #[inline] + pub fn motion_vector_sub_image(mut self, value: SwapchainSubImage<'a, G>) -> Self { + self.inner.motion_vector_sub_image = value.inner; + self + } + #[inline] + pub fn app_space_delta_pose(mut self, value: Posef) -> Self { + self.inner.app_space_delta_pose = value; + self + } + #[inline] + pub fn depth_sub_image(mut self, value: SwapchainSubImage<'a, G>) -> Self { + self.inner.depth_sub_image = value.inner; + self + } + #[inline] + pub fn min_depth(mut self, value: f32) -> Self { + self.inner.min_depth = value; + self + } + #[inline] + pub fn max_depth(mut self, value: f32) -> Self { + self.inner.max_depth = value; + self + } + #[inline] + pub fn near_z(mut self, value: f32) -> Self { + self.inner.near_z = value; + self + } + #[inline] + pub fn far_z(mut self, value: f32) -> Self { + self.inner.far_z = value; + self + } + } + impl<'a, G: Graphics> Default for CompositionLayerSpaceWarpInfoFB<'a, G> { + fn default() -> Self { + Self::new() + } + } + unsafe impl<'a, G: Graphics> ExtendsCompositionLayerProjectionView + for CompositionLayerSpaceWarpInfoFB<'a, G> + { + } #[repr(transparent)] pub struct CompositionLayerBase<'a, G: Graphics> { _inner: sys::CompositionLayerBaseHeader, diff --git a/openxr/src/lib.rs b/openxr/src/lib.rs index 48ad85f7..144e4682 100644 --- a/openxr/src/lib.rs +++ b/openxr/src/lib.rs @@ -43,8 +43,9 @@ pub use passthrough::*; pub use builder::{ CompositionLayerBase, CompositionLayerCubeKHR, CompositionLayerCylinderKHR, - CompositionLayerEquirectKHR, CompositionLayerProjection, CompositionLayerProjectionView, - CompositionLayerQuad, HapticBase, HapticVibration, SwapchainSubImage, CompositionLayerDepthInfoKHR + CompositionLayerDepthInfoKHR, CompositionLayerEquirectKHR, CompositionLayerProjection, + CompositionLayerProjectionView, CompositionLayerQuad, HapticBase, HapticVibration, + SwapchainSubImage, }; pub type Result = std::result::Result; From 52d6edfb0035481f47108b6261f1f738a13605eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacopo=20Lib=C3=A8?= Date: Fri, 26 May 2023 02:55:13 +0200 Subject: [PATCH 4/9] Add layer image layout --- generator/src/main.rs | 1 + openxr/src/generated.rs | 50 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/generator/src/main.rs b/generator/src/main.rs index 0d012556..5badcc52 100644 --- a/generator/src/main.rs +++ b/generator/src/main.rs @@ -1474,6 +1474,7 @@ impl Parser { "XrCompositionLayerProjectionView", "XrCompositionLayerDepthInfoKHR", "XrCompositionLayerSpaceWarpInfoFB", + "XrCompositionLayerImageLayoutFB", "XrSwapchainSubImage", "XrActionSetCreateInfo", "XrActionCreateInfo", diff --git a/openxr/src/generated.rs b/openxr/src/generated.rs index 1fc8836a..55f7bdb5 100644 --- a/openxr/src/generated.rs +++ b/openxr/src/generated.rs @@ -4723,6 +4723,56 @@ pub(crate) mod builder { } #[derive(Copy, Clone)] #[repr(transparent)] + pub struct CompositionLayerImageLayoutFB<'a> { + inner: sys::CompositionLayerImageLayoutFB, + _marker: PhantomData<&'a ()>, + } + impl<'a> CompositionLayerImageLayoutFB<'a> { + #[inline] + pub fn new() -> Self { + Self { + inner: sys::CompositionLayerImageLayoutFB { + ty: sys::StructureType::COMPOSITION_LAYER_IMAGE_LAYOUT_FB, + ..unsafe { mem::zeroed() } + }, + _marker: PhantomData, + } + } + #[doc = r" Initialize with the supplied raw values"] + #[doc = r""] + #[doc = r" # Safety"] + #[doc = r""] + #[doc = r" The guarantees normally enforced by this builder (e.g. lifetimes) must be"] + #[doc = r" preserved."] + #[inline] + pub unsafe fn from_raw(inner: sys::CompositionLayerImageLayoutFB) -> Self { + Self { + inner, + _marker: PhantomData, + } + } + #[inline] + pub fn into_raw(self) -> sys::CompositionLayerImageLayoutFB { + self.inner + } + #[inline] + pub fn as_raw(&self) -> &sys::CompositionLayerImageLayoutFB { + &self.inner + } + #[inline] + pub fn flags(mut self, value: CompositionLayerImageLayoutFlagsFB) -> Self { + self.inner.flags = value; + self + } + } + impl<'a> Default for CompositionLayerImageLayoutFB<'a> { + fn default() -> Self { + Self::new() + } + } + unsafe impl<'a> ExtendsCompositionLayerBaseHeader for CompositionLayerImageLayoutFB<'a> {} + #[derive(Copy, Clone)] + #[repr(transparent)] pub struct CompositionLayerSpaceWarpInfoFB<'a, G: Graphics> { inner: sys::CompositionLayerSpaceWarpInfoFB, _marker: PhantomData<&'a G>, From fca53162f264d97a8a4742c4c57c7f291164b4ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacopo=20Lib=C3=A8?= Date: Fri, 26 May 2023 15:01:01 +0200 Subject: [PATCH 5/9] Try to implement structextends for base headers too --- generator/src/main.rs | 52 ++-- openxr/src/generated.rs | 105 ++++++- sys/src/generated.rs | 630 ---------------------------------------- 3 files changed, 130 insertions(+), 657 deletions(-) diff --git a/generator/src/main.rs b/generator/src/main.rs index 5badcc52..e6eb01c9 100644 --- a/generator/src/main.rs +++ b/generator/src/main.rs @@ -1089,11 +1089,6 @@ impl Parser { #conditions2 impl #ident { pub const TYPE: StructureType = StructureType::#ty; - - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } - #out } } @@ -1638,6 +1633,24 @@ impl Parser { out } + /// Generates a push_next function for structures that can be extended through the `next` pointer + fn generate_next_fn(extension_trait_ident: &Ident) -> TokenStream { + quote! { + #[inline] + #[doc = "Chains a structure as the next member of this one"] + pub fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let other: &mut sys::BaseOutStructure = mem::transmute(next); + let next_ptr = <*mut sys::BaseOutStructure>::cast((*other).next); + let last_next = sys::ptr_chain_iter(other).last().unwrap(); + (*last_next).next = self.inner.next as _; + self.inner.next = next_ptr; + } + self + } + } + } + fn generate_polymorphic_builders( &self, meta: &HashMap<&str, StructMeta>, @@ -1724,12 +1737,19 @@ impl Parser { } }); + let extends_name = format_ident!("Extends{}", base_ident); + let next_fn = Self::generate_next_fn(&extends_name); + quote! { #[repr(transparent)] pub struct #base_ident #type_params { - _inner: sys::#sys_ident, + inner: sys::#sys_ident, #marker } + pub unsafe trait #extends_name {} + impl #type_params #base_ident #type_args { + #next_fn + } #(#builders)* } } @@ -1882,24 +1902,16 @@ impl Parser { // Adds a `push_next` method to the builder if the struct is a root struct // based on Ash let next_fn = if is_root_struct { - quote! { - #[inline] - pub fn push_next(mut self, next: &'a mut T) -> Self { - unsafe { - let other: &mut sys::BaseOutStructure = mem::transmute(next); - let next_ptr = <*mut sys::BaseOutStructure>::cast((*other).next); - let last_next = sys::ptr_chain_iter(other).last().unwrap(); - (*last_next).next = self.inner.next as _; - self.inner.next = next_ptr; - } - self - } - } + Self::generate_next_fn(&extends_name) } else { quote!() }; let implement_extensions = if let Some(parent_struct) = s.extends.as_ref() { - let parent_ident = xr_ty_name(parent_struct); + let parent_ident = if self.base_headers.contains_key(parent_struct.as_ref()) { + base_header_ty(parent_struct.as_ref()) + } else { + xr_ty_name(parent_struct) + }; let parent_extend_name = format_ident!("Extends{}", parent_ident); quote!(unsafe impl #type_params #parent_extend_name for #ident #type_args {}) } else { diff --git a/openxr/src/generated.rs b/openxr/src/generated.rs index 55f7bdb5..a921ff2d 100644 --- a/openxr/src/generated.rs +++ b/openxr/src/generated.rs @@ -4504,6 +4504,7 @@ pub(crate) mod builder { self } #[inline] + #[doc = "Chains a structure as the next member of this one"] pub fn push_next( mut self, next: &'a mut T, @@ -4770,7 +4771,7 @@ pub(crate) mod builder { Self::new() } } - unsafe impl<'a> ExtendsCompositionLayerBaseHeader for CompositionLayerImageLayoutFB<'a> {} + unsafe impl<'a> ExtendsCompositionLayerBase for CompositionLayerImageLayoutFB<'a> {} #[derive(Copy, Clone)] #[repr(transparent)] pub struct CompositionLayerSpaceWarpInfoFB<'a, G: Graphics> { @@ -4861,9 +4862,24 @@ pub(crate) mod builder { } #[repr(transparent)] pub struct CompositionLayerBase<'a, G: Graphics> { - _inner: sys::CompositionLayerBaseHeader, + inner: sys::CompositionLayerBaseHeader, _marker: PhantomData<&'a G>, } + pub unsafe trait ExtendsCompositionLayerBase {} + impl<'a, G: Graphics> CompositionLayerBase<'a, G> { + #[inline] + #[doc = "Chains a structure as the next member of this one"] + pub fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let other: &mut sys::BaseOutStructure = mem::transmute(next); + let next_ptr = <*mut sys::BaseOutStructure>::cast((*other).next); + let last_next = sys::ptr_chain_iter(other).last().unwrap(); + (*last_next).next = self.inner.next as _; + self.inner.next = next_ptr; + } + self + } + } #[derive(Copy, Clone)] #[repr(transparent)] pub struct CompositionLayerProjection<'a, G: Graphics> { @@ -5373,9 +5389,24 @@ pub(crate) mod builder { } #[repr(transparent)] pub struct HapticBase<'a> { - _inner: sys::HapticBaseHeader, + inner: sys::HapticBaseHeader, _marker: PhantomData<&'a ()>, } + pub unsafe trait ExtendsHapticBase {} + impl<'a> HapticBase<'a> { + #[inline] + #[doc = "Chains a structure as the next member of this one"] + pub fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let other: &mut sys::BaseOutStructure = mem::transmute(next); + let next_ptr = <*mut sys::BaseOutStructure>::cast((*other).next); + let last_next = sys::ptr_chain_iter(other).last().unwrap(); + (*last_next).next = self.inner.next as _; + self.inner.next = next_ptr; + } + self + } + } #[derive(Copy, Clone)] #[repr(transparent)] pub struct HapticVibration<'a> { @@ -5444,9 +5475,24 @@ pub(crate) mod builder { } #[repr(transparent)] pub struct BindingModificationBase<'a> { - _inner: sys::BindingModificationBaseHeaderKHR, + inner: sys::BindingModificationBaseHeaderKHR, _marker: PhantomData<&'a ()>, } + pub unsafe trait ExtendsBindingModificationBase {} + impl<'a> BindingModificationBase<'a> { + #[inline] + #[doc = "Chains a structure as the next member of this one"] + pub fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let other: &mut sys::BaseOutStructure = mem::transmute(next); + let next_ptr = <*mut sys::BaseOutStructure>::cast((*other).next); + let last_next = sys::ptr_chain_iter(other).last().unwrap(); + (*last_next).next = self.inner.next as _; + self.inner.next = next_ptr; + } + self + } + } #[derive(Copy, Clone)] #[repr(transparent)] pub struct InteractionProfileDpadBindingEXT<'a> { @@ -5626,9 +5672,24 @@ pub(crate) mod builder { } #[repr(transparent)] pub struct SwapchainStateBase<'a> { - _inner: sys::SwapchainStateBaseHeaderFB, + inner: sys::SwapchainStateBaseHeaderFB, _marker: PhantomData<&'a ()>, } + pub unsafe trait ExtendsSwapchainStateBase {} + impl<'a> SwapchainStateBase<'a> { + #[inline] + #[doc = "Chains a structure as the next member of this one"] + pub fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let other: &mut sys::BaseOutStructure = mem::transmute(next); + let next_ptr = <*mut sys::BaseOutStructure>::cast((*other).next); + let last_next = sys::ptr_chain_iter(other).last().unwrap(); + (*last_next).next = self.inner.next as _; + self.inner.next = next_ptr; + } + self + } + } #[cfg(target_os = "android")] #[derive(Copy, Clone)] #[repr(transparent)] @@ -5964,9 +6025,24 @@ pub(crate) mod builder { } #[repr(transparent)] pub struct SpaceQueryInfoBase<'a> { - _inner: sys::SpaceQueryInfoBaseHeaderFB, + inner: sys::SpaceQueryInfoBaseHeaderFB, _marker: PhantomData<&'a ()>, } + pub unsafe trait ExtendsSpaceQueryInfoBase {} + impl<'a> SpaceQueryInfoBase<'a> { + #[inline] + #[doc = "Chains a structure as the next member of this one"] + pub fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let other: &mut sys::BaseOutStructure = mem::transmute(next); + let next_ptr = <*mut sys::BaseOutStructure>::cast((*other).next); + let last_next = sys::ptr_chain_iter(other).last().unwrap(); + (*last_next).next = self.inner.next as _; + self.inner.next = next_ptr; + } + self + } + } #[derive(Copy, Clone)] #[repr(transparent)] pub struct SpaceQueryInfoFB<'a> { @@ -6045,9 +6121,24 @@ pub(crate) mod builder { } #[repr(transparent)] pub struct SpaceFilterInfoBase<'a> { - _inner: sys::SpaceFilterInfoBaseHeaderFB, + inner: sys::SpaceFilterInfoBaseHeaderFB, _marker: PhantomData<&'a ()>, } + pub unsafe trait ExtendsSpaceFilterInfoBase {} + impl<'a> SpaceFilterInfoBase<'a> { + #[inline] + #[doc = "Chains a structure as the next member of this one"] + pub fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let other: &mut sys::BaseOutStructure = mem::transmute(next); + let next_ptr = <*mut sys::BaseOutStructure>::cast((*other).next); + let last_next = sys::ptr_chain_iter(other).last().unwrap(); + (*last_next).next = self.inner.next as _; + self.inner.next = next_ptr; + } + self + } + } #[derive(Copy, Clone)] #[repr(transparent)] pub struct SpaceUuidFilterInfoFB<'a> { diff --git a/sys/src/generated.rs b/sys/src/generated.rs index 1be1184a..91768080 100644 --- a/sys/src/generated.rs +++ b/sys/src/generated.rs @@ -3070,9 +3070,6 @@ pub struct ApiLayerProperties { } impl ApiLayerProperties { pub const TYPE: StructureType = StructureType::API_LAYER_PROPERTIES; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -3097,9 +3094,6 @@ pub struct ExtensionProperties { } impl ExtensionProperties { pub const TYPE: StructureType = StructureType::EXTENSION_PROPERTIES; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -3138,9 +3132,6 @@ pub struct InstanceCreateInfo { } impl InstanceCreateInfo { pub const TYPE: StructureType = StructureType::INSTANCE_CREATE_INFO; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3153,9 +3144,6 @@ pub struct InstanceProperties { } impl InstanceProperties { pub const TYPE: StructureType = StructureType::INSTANCE_PROPERTIES; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -3179,9 +3167,6 @@ pub struct SystemGetInfo { } impl SystemGetInfo { pub const TYPE: StructureType = StructureType::SYSTEM_GET_INFO; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3197,9 +3182,6 @@ pub struct SystemProperties { } impl SystemProperties { pub const TYPE: StructureType = StructureType::SYSTEM_PROPERTIES; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -3241,9 +3223,6 @@ pub struct GraphicsBindingOpenGLWin32KHR { #[cfg(windows)] impl GraphicsBindingOpenGLWin32KHR { pub const TYPE: StructureType = StructureType::GRAPHICS_BINDING_OPENGL_WIN32_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3259,9 +3238,6 @@ pub struct GraphicsBindingOpenGLXlibKHR { } impl GraphicsBindingOpenGLXlibKHR { pub const TYPE: StructureType = StructureType::GRAPHICS_BINDING_OPENGL_XLIB_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3278,9 +3254,6 @@ pub struct GraphicsBindingOpenGLXcbKHR { } impl GraphicsBindingOpenGLXcbKHR { pub const TYPE: StructureType = StructureType::GRAPHICS_BINDING_OPENGL_XCB_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3292,9 +3265,6 @@ pub struct GraphicsBindingOpenGLWaylandKHR { } impl GraphicsBindingOpenGLWaylandKHR { pub const TYPE: StructureType = StructureType::GRAPHICS_BINDING_OPENGL_WAYLAND_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3308,9 +3278,6 @@ pub struct GraphicsBindingD3D11KHR { #[cfg(windows)] impl GraphicsBindingD3D11KHR { pub const TYPE: StructureType = StructureType::GRAPHICS_BINDING_D3D11_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3325,9 +3292,6 @@ pub struct GraphicsBindingD3D12KHR { #[cfg(windows)] impl GraphicsBindingD3D12KHR { pub const TYPE: StructureType = StructureType::GRAPHICS_BINDING_D3D12_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3343,9 +3307,6 @@ pub struct GraphicsBindingOpenGLESAndroidKHR { #[cfg(target_os = "android")] impl GraphicsBindingOpenGLESAndroidKHR { pub const TYPE: StructureType = StructureType::GRAPHICS_BINDING_OPENGL_ES_ANDROID_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3361,9 +3322,6 @@ pub struct GraphicsBindingVulkanKHR { } impl GraphicsBindingVulkanKHR { pub const TYPE: StructureType = StructureType::GRAPHICS_BINDING_VULKAN_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3376,9 +3334,6 @@ pub struct SessionCreateInfo { } impl SessionCreateInfo { pub const TYPE: StructureType = StructureType::SESSION_CREATE_INFO; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3390,9 +3345,6 @@ pub struct SessionBeginInfo { } impl SessionBeginInfo { pub const TYPE: StructureType = StructureType::SESSION_BEGIN_INFO; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3412,9 +3364,6 @@ pub struct SwapchainCreateInfo { } impl SwapchainCreateInfo { pub const TYPE: StructureType = StructureType::SWAPCHAIN_CREATE_INFO; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3433,9 +3382,6 @@ pub struct SwapchainImageOpenGLKHR { } impl SwapchainImageOpenGLKHR { pub const TYPE: StructureType = StructureType::SWAPCHAIN_IMAGE_OPENGL_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -3459,9 +3405,6 @@ pub struct SwapchainImageOpenGLESKHR { } impl SwapchainImageOpenGLESKHR { pub const TYPE: StructureType = StructureType::SWAPCHAIN_IMAGE_OPENGL_ES_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -3485,9 +3428,6 @@ pub struct SwapchainImageVulkanKHR { } impl SwapchainImageVulkanKHR { pub const TYPE: StructureType = StructureType::SWAPCHAIN_IMAGE_VULKAN_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -3513,9 +3453,6 @@ pub struct SwapchainImageD3D11KHR { #[cfg(windows)] impl SwapchainImageD3D11KHR { pub const TYPE: StructureType = StructureType::SWAPCHAIN_IMAGE_D3D11_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -3541,9 +3478,6 @@ pub struct SwapchainImageD3D12KHR { #[cfg(windows)] impl SwapchainImageD3D12KHR { pub const TYPE: StructureType = StructureType::SWAPCHAIN_IMAGE_D3D12_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -3566,9 +3500,6 @@ pub struct SwapchainImageAcquireInfo { } impl SwapchainImageAcquireInfo { pub const TYPE: StructureType = StructureType::SWAPCHAIN_IMAGE_ACQUIRE_INFO; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3580,9 +3511,6 @@ pub struct SwapchainImageWaitInfo { } impl SwapchainImageWaitInfo { pub const TYPE: StructureType = StructureType::SWAPCHAIN_IMAGE_WAIT_INFO; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3593,9 +3521,6 @@ pub struct SwapchainImageReleaseInfo { } impl SwapchainImageReleaseInfo { pub const TYPE: StructureType = StructureType::SWAPCHAIN_IMAGE_RELEASE_INFO; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3608,9 +3533,6 @@ pub struct ReferenceSpaceCreateInfo { } impl ReferenceSpaceCreateInfo { pub const TYPE: StructureType = StructureType::REFERENCE_SPACE_CREATE_INFO; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3624,9 +3546,6 @@ pub struct ActionSpaceCreateInfo { } impl ActionSpaceCreateInfo { pub const TYPE: StructureType = StructureType::ACTION_SPACE_CREATE_INFO; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3639,9 +3558,6 @@ pub struct SpaceLocation { } impl SpaceLocation { pub const TYPE: StructureType = StructureType::SPACE_LOCATION; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -3667,9 +3583,6 @@ pub struct SpaceVelocity { } impl SpaceVelocity { pub const TYPE: StructureType = StructureType::SPACE_VELOCITY; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -3703,9 +3616,6 @@ pub struct View { } impl View { pub const TYPE: StructureType = StructureType::VIEW; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -3731,9 +3641,6 @@ pub struct ViewLocateInfo { } impl ViewLocateInfo { pub const TYPE: StructureType = StructureType::VIEW_LOCATE_INFO; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3745,9 +3652,6 @@ pub struct ViewState { } impl ViewState { pub const TYPE: StructureType = StructureType::VIEW_STATE; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -3776,9 +3680,6 @@ pub struct ViewConfigurationView { } impl ViewConfigurationView { pub const TYPE: StructureType = StructureType::VIEW_CONFIGURATION_VIEW; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -3821,9 +3722,6 @@ pub struct CompositionLayerProjectionView { } impl CompositionLayerProjectionView { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_PROJECTION_VIEW; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3838,9 +3736,6 @@ pub struct CompositionLayerProjection { } impl CompositionLayerProjection { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_PROJECTION; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3857,9 +3752,6 @@ pub struct CompositionLayerQuad { } impl CompositionLayerQuad { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_QUAD; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3878,9 +3770,6 @@ pub struct CompositionLayerCylinderKHR { } impl CompositionLayerCylinderKHR { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_CYLINDER_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3897,9 +3786,6 @@ pub struct CompositionLayerCubeKHR { } impl CompositionLayerCubeKHR { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_CUBE_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3918,9 +3804,6 @@ pub struct CompositionLayerEquirectKHR { } impl CompositionLayerEquirectKHR { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_EQUIRECT_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3936,9 +3819,6 @@ pub struct CompositionLayerDepthInfoKHR { } impl CompositionLayerDepthInfoKHR { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_DEPTH_INFO_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3949,9 +3829,6 @@ pub struct FrameBeginInfo { } impl FrameBeginInfo { pub const TYPE: StructureType = StructureType::FRAME_BEGIN_INFO; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3966,9 +3843,6 @@ pub struct FrameEndInfo { } impl FrameEndInfo { pub const TYPE: StructureType = StructureType::FRAME_END_INFO; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3979,9 +3853,6 @@ pub struct FrameWaitInfo { } impl FrameWaitInfo { pub const TYPE: StructureType = StructureType::FRAME_WAIT_INFO; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -3995,9 +3866,6 @@ pub struct FrameState { } impl FrameState { pub const TYPE: StructureType = StructureType::FRAME_STATE; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4030,9 +3898,6 @@ pub struct HapticVibration { } impl HapticVibration { pub const TYPE: StructureType = StructureType::HAPTIC_VIBRATION; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4051,9 +3916,6 @@ pub struct EventDataBuffer { } impl EventDataBuffer { pub const TYPE: StructureType = StructureType::EVENT_DATA_BUFFER; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4065,9 +3927,6 @@ pub struct EventDataEventsLost { } impl EventDataEventsLost { pub const TYPE: StructureType = StructureType::EVENT_DATA_EVENTS_LOST; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4079,9 +3938,6 @@ pub struct EventDataInstanceLossPending { } impl EventDataInstanceLossPending { pub const TYPE: StructureType = StructureType::EVENT_DATA_INSTANCE_LOSS_PENDING; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4095,9 +3951,6 @@ pub struct EventDataSessionStateChanged { } impl EventDataSessionStateChanged { pub const TYPE: StructureType = StructureType::EVENT_DATA_SESSION_STATE_CHANGED; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4113,9 +3966,6 @@ pub struct EventDataReferenceSpaceChangePending { } impl EventDataReferenceSpaceChangePending { pub const TYPE: StructureType = StructureType::EVENT_DATA_REFERENCE_SPACE_CHANGE_PENDING; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4130,9 +3980,6 @@ pub struct EventDataPerfSettingsEXT { } impl EventDataPerfSettingsEXT { pub const TYPE: StructureType = StructureType::EVENT_DATA_PERF_SETTINGS_EXT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4146,9 +3993,6 @@ pub struct EventDataVisibilityMaskChangedKHR { } impl EventDataVisibilityMaskChangedKHR { pub const TYPE: StructureType = StructureType::EVENT_DATA_VISIBILITY_MASK_CHANGED_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4161,9 +4005,6 @@ pub struct ViewConfigurationProperties { } impl ViewConfigurationProperties { pub const TYPE: StructureType = StructureType::VIEW_CONFIGURATION_PROPERTIES; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4190,9 +4031,6 @@ pub struct ActionStateBoolean { } impl ActionStateBoolean { pub const TYPE: StructureType = StructureType::ACTION_STATE_BOOLEAN; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4219,9 +4057,6 @@ pub struct ActionStateFloat { } impl ActionStateFloat { pub const TYPE: StructureType = StructureType::ACTION_STATE_FLOAT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4248,9 +4083,6 @@ pub struct ActionStateVector2f { } impl ActionStateVector2f { pub const TYPE: StructureType = StructureType::ACTION_STATE_VECTOR2F; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4274,9 +4106,6 @@ pub struct ActionStatePose { } impl ActionStatePose { pub const TYPE: StructureType = StructureType::ACTION_STATE_POSE; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4301,9 +4130,6 @@ pub struct ActionStateGetInfo { } impl ActionStateGetInfo { pub const TYPE: StructureType = StructureType::ACTION_STATE_GET_INFO; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4316,9 +4142,6 @@ pub struct HapticActionInfo { } impl HapticActionInfo { pub const TYPE: StructureType = StructureType::HAPTIC_ACTION_INFO; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4332,9 +4155,6 @@ pub struct ActionSetCreateInfo { } impl ActionSetCreateInfo { pub const TYPE: StructureType = StructureType::ACTION_SET_CREATE_INFO; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4355,9 +4175,6 @@ pub struct InteractionProfileSuggestedBinding { } impl InteractionProfileSuggestedBinding { pub const TYPE: StructureType = StructureType::INTERACTION_PROFILE_SUGGESTED_BINDING; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4377,9 +4194,6 @@ pub struct SessionActionSetsAttachInfo { } impl SessionActionSetsAttachInfo { pub const TYPE: StructureType = StructureType::SESSION_ACTION_SETS_ATTACH_INFO; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4392,9 +4206,6 @@ pub struct ActionsSyncInfo { } impl ActionsSyncInfo { pub const TYPE: StructureType = StructureType::ACTIONS_SYNC_INFO; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4406,9 +4217,6 @@ pub struct BoundSourcesForActionEnumerateInfo { } impl BoundSourcesForActionEnumerateInfo { pub const TYPE: StructureType = StructureType::BOUND_SOURCES_FOR_ACTION_ENUMERATE_INFO; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4421,9 +4229,6 @@ pub struct InputSourceLocalizedNameGetInfo { } impl InputSourceLocalizedNameGetInfo { pub const TYPE: StructureType = StructureType::INPUT_SOURCE_LOCALIZED_NAME_GET_INFO; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4435,9 +4240,6 @@ pub struct EventDataInteractionProfileChanged { } impl EventDataInteractionProfileChanged { pub const TYPE: StructureType = StructureType::EVENT_DATA_INTERACTION_PROFILE_CHANGED; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4449,9 +4251,6 @@ pub struct InteractionProfileState { } impl InteractionProfileState { pub const TYPE: StructureType = StructureType::INTERACTION_PROFILE_STATE; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4479,9 +4278,6 @@ pub struct ActionCreateInfo { } impl ActionCreateInfo { pub const TYPE: StructureType = StructureType::ACTION_CREATE_INFO; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4496,9 +4292,6 @@ pub struct InstanceCreateInfoAndroidKHR { #[cfg(target_os = "android")] impl InstanceCreateInfoAndroidKHR { pub const TYPE: StructureType = StructureType::INSTANCE_CREATE_INFO_ANDROID_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4511,9 +4304,6 @@ pub struct VulkanSwapchainFormatListCreateInfoKHR { } impl VulkanSwapchainFormatListCreateInfoKHR { pub const TYPE: StructureType = StructureType::VULKAN_SWAPCHAIN_FORMAT_LIST_CREATE_INFO_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4527,9 +4317,6 @@ pub struct DebugUtilsObjectNameInfoEXT { } impl DebugUtilsObjectNameInfoEXT { pub const TYPE: StructureType = StructureType::DEBUG_UTILS_OBJECT_NAME_INFO_EXT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4541,9 +4328,6 @@ pub struct DebugUtilsLabelEXT { } impl DebugUtilsLabelEXT { pub const TYPE: StructureType = StructureType::DEBUG_UTILS_LABEL_EXT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4561,9 +4345,6 @@ pub struct DebugUtilsMessengerCallbackDataEXT { } impl DebugUtilsMessengerCallbackDataEXT { pub const TYPE: StructureType = StructureType::DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone)] @@ -4578,9 +4359,6 @@ pub struct DebugUtilsMessengerCreateInfoEXT { } impl DebugUtilsMessengerCreateInfoEXT { pub const TYPE: StructureType = StructureType::DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4597,9 +4375,6 @@ pub struct VisibilityMaskKHR { } impl VisibilityMaskKHR { pub const TYPE: StructureType = StructureType::VISIBILITY_MASK_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4624,9 +4399,6 @@ pub struct GraphicsRequirementsOpenGLKHR { } impl GraphicsRequirementsOpenGLKHR { pub const TYPE: StructureType = StructureType::GRAPHICS_REQUIREMENTS_OPENGL_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4651,9 +4423,6 @@ pub struct GraphicsRequirementsOpenGLESKHR { } impl GraphicsRequirementsOpenGLESKHR { pub const TYPE: StructureType = StructureType::GRAPHICS_REQUIREMENTS_OPENGL_ES_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4678,9 +4447,6 @@ pub struct GraphicsRequirementsVulkanKHR { } impl GraphicsRequirementsVulkanKHR { pub const TYPE: StructureType = StructureType::GRAPHICS_REQUIREMENTS_VULKAN_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4707,9 +4473,6 @@ pub struct GraphicsRequirementsD3D11KHR { #[cfg(windows)] impl GraphicsRequirementsD3D11KHR { pub const TYPE: StructureType = StructureType::GRAPHICS_REQUIREMENTS_D3D11_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4736,9 +4499,6 @@ pub struct GraphicsRequirementsD3D12KHR { #[cfg(windows)] impl GraphicsRequirementsD3D12KHR { pub const TYPE: StructureType = StructureType::GRAPHICS_REQUIREMENTS_D3D12_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4766,9 +4526,6 @@ pub struct VulkanInstanceCreateInfoKHR { } impl VulkanInstanceCreateInfoKHR { pub const TYPE: StructureType = StructureType::VULKAN_INSTANCE_CREATE_INFO_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone)] @@ -4785,9 +4542,6 @@ pub struct VulkanDeviceCreateInfoKHR { } impl VulkanDeviceCreateInfoKHR { pub const TYPE: StructureType = StructureType::VULKAN_DEVICE_CREATE_INFO_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4800,9 +4554,6 @@ pub struct VulkanGraphicsDeviceGetInfoKHR { } impl VulkanGraphicsDeviceGetInfoKHR { pub const TYPE: StructureType = StructureType::VULKAN_GRAPHICS_DEVICE_GET_INFO_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4815,9 +4566,6 @@ pub struct VulkanSwapchainCreateInfoMETA { } impl VulkanSwapchainCreateInfoMETA { pub const TYPE: StructureType = StructureType::VULKAN_SWAPCHAIN_CREATE_INFO_META; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4830,9 +4578,6 @@ pub struct SessionCreateInfoOverlayEXTX { } impl SessionCreateInfoOverlayEXTX { pub const TYPE: StructureType = StructureType::SESSION_CREATE_INFO_OVERLAY_EXTX; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4845,9 +4590,6 @@ pub struct EventDataMainSessionVisibilityChangedEXTX { } impl EventDataMainSessionVisibilityChangedEXTX { pub const TYPE: StructureType = StructureType::EVENT_DATA_MAIN_SESSION_VISIBILITY_CHANGED_EXTX; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4860,9 +4602,6 @@ pub struct EventDataDisplayRefreshRateChangedFB { } impl EventDataDisplayRefreshRateChangedFB { pub const TYPE: StructureType = StructureType::EVENT_DATA_DISPLAY_REFRESH_RATE_CHANGED_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4877,9 +4616,6 @@ pub struct ViewConfigurationDepthRangeEXT { } impl ViewConfigurationDepthRangeEXT { pub const TYPE: StructureType = StructureType::VIEW_CONFIGURATION_DEPTH_RANGE_EXT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -4904,9 +4640,6 @@ pub struct ViewConfigurationViewFovEPIC { } impl ViewConfigurationViewFovEPIC { pub const TYPE: StructureType = StructureType::VIEW_CONFIGURATION_VIEW_FOV_EPIC; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4926,9 +4659,6 @@ pub struct InteractionProfileDpadBindingEXT { } impl InteractionProfileDpadBindingEXT { pub const TYPE: StructureType = StructureType::INTERACTION_PROFILE_DPAD_BINDING_EXT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4945,9 +4675,6 @@ pub struct InteractionProfileAnalogThresholdVALVE { } impl InteractionProfileAnalogThresholdVALVE { pub const TYPE: StructureType = StructureType::INTERACTION_PROFILE_ANALOG_THRESHOLD_VALVE; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4960,9 +4687,6 @@ pub struct BindingModificationsKHR { } impl BindingModificationsKHR { pub const TYPE: StructureType = StructureType::BINDING_MODIFICATIONS_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -4981,9 +4705,6 @@ pub struct SystemEyeGazeInteractionPropertiesEXT { } impl SystemEyeGazeInteractionPropertiesEXT { pub const TYPE: StructureType = StructureType::SYSTEM_EYE_GAZE_INTERACTION_PROPERTIES_EXT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5007,9 +4728,6 @@ pub struct EyeGazeSampleTimeEXT { } impl EyeGazeSampleTimeEXT { pub const TYPE: StructureType = StructureType::EYE_GAZE_SAMPLE_TIME_EXT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5035,9 +4753,6 @@ pub struct SpatialAnchorCreateInfoMSFT { } impl SpatialAnchorCreateInfoMSFT { pub const TYPE: StructureType = StructureType::SPATIAL_ANCHOR_CREATE_INFO_MSFT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5050,9 +4765,6 @@ pub struct SpatialAnchorSpaceCreateInfoMSFT { } impl SpatialAnchorSpaceCreateInfoMSFT { pub const TYPE: StructureType = StructureType::SPATIAL_ANCHOR_SPACE_CREATE_INFO_MSFT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5064,9 +4776,6 @@ pub struct CompositionLayerImageLayoutFB { } impl CompositionLayerImageLayoutFB { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_IMAGE_LAYOUT_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5093,9 +4802,6 @@ pub struct CompositionLayerAlphaBlendFB { } impl CompositionLayerAlphaBlendFB { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_ALPHA_BLEND_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5122,9 +4828,6 @@ pub struct GraphicsBindingEGLMNDX { } impl GraphicsBindingEGLMNDX { pub const TYPE: StructureType = StructureType::GRAPHICS_BINDING_EGL_MNDX; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5138,9 +4841,6 @@ pub struct SpatialGraphNodeSpaceCreateInfoMSFT { } impl SpatialGraphNodeSpaceCreateInfoMSFT { pub const TYPE: StructureType = StructureType::SPATIAL_GRAPH_NODE_SPACE_CREATE_INFO_MSFT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5155,9 +4855,6 @@ pub struct SpatialGraphStaticNodeBindingCreateInfoMSFT { impl SpatialGraphStaticNodeBindingCreateInfoMSFT { pub const TYPE: StructureType = StructureType::SPATIAL_GRAPH_STATIC_NODE_BINDING_CREATE_INFO_MSFT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5169,9 +4866,6 @@ pub struct SpatialGraphNodeBindingPropertiesGetInfoMSFT { impl SpatialGraphNodeBindingPropertiesGetInfoMSFT { pub const TYPE: StructureType = StructureType::SPATIAL_GRAPH_NODE_BINDING_PROPERTIES_GET_INFO_MSFT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5184,9 +4878,6 @@ pub struct SpatialGraphNodeBindingPropertiesMSFT { } impl SpatialGraphNodeBindingPropertiesMSFT { pub const TYPE: StructureType = StructureType::SPATIAL_GRAPH_NODE_BINDING_PROPERTIES_MSFT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5210,9 +4901,6 @@ pub struct SystemHandTrackingPropertiesEXT { } impl SystemHandTrackingPropertiesEXT { pub const TYPE: StructureType = StructureType::SYSTEM_HAND_TRACKING_PROPERTIES_EXT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5237,9 +4925,6 @@ pub struct HandTrackerCreateInfoEXT { } impl HandTrackerCreateInfoEXT { pub const TYPE: StructureType = StructureType::HAND_TRACKER_CREATE_INFO_EXT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5252,9 +4937,6 @@ pub struct HandJointsLocateInfoEXT { } impl HandJointsLocateInfoEXT { pub const TYPE: StructureType = StructureType::HAND_JOINTS_LOCATE_INFO_EXT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug, Default, PartialEq)] @@ -5284,9 +4966,6 @@ pub struct HandJointLocationsEXT { } impl HandJointLocationsEXT { pub const TYPE: StructureType = StructureType::HAND_JOINT_LOCATIONS_EXT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5311,9 +4990,6 @@ pub struct HandJointVelocitiesEXT { } impl HandJointVelocitiesEXT { pub const TYPE: StructureType = StructureType::HAND_JOINT_VELOCITIES_EXT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5337,9 +5013,6 @@ pub struct HandJointsMotionRangeInfoEXT { } impl HandJointsMotionRangeInfoEXT { pub const TYPE: StructureType = StructureType::HAND_JOINTS_MOTION_RANGE_INFO_EXT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5352,9 +5025,6 @@ pub struct HandMeshSpaceCreateInfoMSFT { } impl HandMeshSpaceCreateInfoMSFT { pub const TYPE: StructureType = StructureType::HAND_MESH_SPACE_CREATE_INFO_MSFT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5367,9 +5037,6 @@ pub struct HandMeshUpdateInfoMSFT { } impl HandMeshUpdateInfoMSFT { pub const TYPE: StructureType = StructureType::HAND_MESH_UPDATE_INFO_MSFT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5385,9 +5052,6 @@ pub struct HandMeshMSFT { } impl HandMeshMSFT { pub const TYPE: StructureType = StructureType::HAND_MESH_MSFT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5438,9 +5102,6 @@ pub struct SystemHandTrackingMeshPropertiesMSFT { } impl SystemHandTrackingMeshPropertiesMSFT { pub const TYPE: StructureType = StructureType::SYSTEM_HAND_TRACKING_MESH_PROPERTIES_MSFT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5464,9 +5125,6 @@ pub struct HandPoseTypeInfoMSFT { } impl HandPoseTypeInfoMSFT { pub const TYPE: StructureType = StructureType::HAND_POSE_TYPE_INFO_MSFT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5480,9 +5138,6 @@ pub struct SecondaryViewConfigurationSessionBeginInfoMSFT { impl SecondaryViewConfigurationSessionBeginInfoMSFT { pub const TYPE: StructureType = StructureType::SECONDARY_VIEW_CONFIGURATION_SESSION_BEGIN_INFO_MSFT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5495,9 +5150,6 @@ pub struct SecondaryViewConfigurationStateMSFT { } impl SecondaryViewConfigurationStateMSFT { pub const TYPE: StructureType = StructureType::SECONDARY_VIEW_CONFIGURATION_STATE_MSFT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5522,9 +5174,6 @@ pub struct SecondaryViewConfigurationFrameStateMSFT { } impl SecondaryViewConfigurationFrameStateMSFT { pub const TYPE: StructureType = StructureType::SECONDARY_VIEW_CONFIGURATION_FRAME_STATE_MSFT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5549,9 +5198,6 @@ pub struct SecondaryViewConfigurationFrameEndInfoMSFT { } impl SecondaryViewConfigurationFrameEndInfoMSFT { pub const TYPE: StructureType = StructureType::SECONDARY_VIEW_CONFIGURATION_FRAME_END_INFO_MSFT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5566,9 +5212,6 @@ pub struct SecondaryViewConfigurationLayerInfoMSFT { } impl SecondaryViewConfigurationLayerInfoMSFT { pub const TYPE: StructureType = StructureType::SECONDARY_VIEW_CONFIGURATION_LAYER_INFO_MSFT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5581,9 +5224,6 @@ pub struct SecondaryViewConfigurationSwapchainCreateInfoMSFT { impl SecondaryViewConfigurationSwapchainCreateInfoMSFT { pub const TYPE: StructureType = StructureType::SECONDARY_VIEW_CONFIGURATION_SWAPCHAIN_CREATE_INFO_MSFT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5598,9 +5238,6 @@ pub struct HolographicWindowAttachmentMSFT { #[cfg(windows)] impl HolographicWindowAttachmentMSFT { pub const TYPE: StructureType = StructureType::HOLOGRAPHIC_WINDOW_ATTACHMENT_MSFT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5614,9 +5251,6 @@ pub struct AndroidSurfaceSwapchainCreateInfoFB { #[cfg(target_os = "android")] impl AndroidSurfaceSwapchainCreateInfoFB { pub const TYPE: StructureType = StructureType::ANDROID_SURFACE_SWAPCHAIN_CREATE_INFO_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5638,9 +5272,6 @@ pub struct SwapchainStateAndroidSurfaceDimensionsFB { #[cfg(target_os = "android")] impl SwapchainStateAndroidSurfaceDimensionsFB { pub const TYPE: StructureType = StructureType::SWAPCHAIN_STATE_ANDROID_SURFACE_DIMENSIONS_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5673,9 +5304,6 @@ pub struct SwapchainStateSamplerOpenGLESFB { } impl SwapchainStateSamplerOpenGLESFB { pub const TYPE: StructureType = StructureType::SWAPCHAIN_STATE_SAMPLER_OPENGL_ES_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5709,9 +5337,6 @@ pub struct SwapchainStateSamplerVulkanFB { } impl SwapchainStateSamplerVulkanFB { pub const TYPE: StructureType = StructureType::SWAPCHAIN_STATE_SAMPLER_VULKAN_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5735,9 +5360,6 @@ pub struct CompositionLayerSecureContentFB { } impl CompositionLayerSecureContentFB { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_SECURE_CONTENT_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5759,9 +5381,6 @@ pub struct LoaderInitInfoAndroidKHR { #[cfg(target_os = "android")] impl LoaderInitInfoAndroidKHR { pub const TYPE: StructureType = StructureType::LOADER_INIT_INFO_ANDROID_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5781,9 +5400,6 @@ pub struct CompositionLayerEquirect2KHR { } impl CompositionLayerEquirect2KHR { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_EQUIRECT2_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5796,9 +5412,6 @@ pub struct CompositionLayerColorScaleBiasKHR { } impl CompositionLayerColorScaleBiasKHR { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_COLOR_SCALE_BIAS_KHR; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5810,9 +5423,6 @@ pub struct ControllerModelKeyStateMSFT { } impl ControllerModelKeyStateMSFT { pub const TYPE: StructureType = StructureType::CONTROLLER_MODEL_KEY_STATE_MSFT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5837,9 +5447,6 @@ pub struct ControllerModelNodePropertiesMSFT { } impl ControllerModelNodePropertiesMSFT { pub const TYPE: StructureType = StructureType::CONTROLLER_MODEL_NODE_PROPERTIES_MSFT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5865,9 +5472,6 @@ pub struct ControllerModelPropertiesMSFT { } impl ControllerModelPropertiesMSFT { pub const TYPE: StructureType = StructureType::CONTROLLER_MODEL_PROPERTIES_MSFT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5891,9 +5495,6 @@ pub struct ControllerModelNodeStateMSFT { } impl ControllerModelNodeStateMSFT { pub const TYPE: StructureType = StructureType::CONTROLLER_MODEL_NODE_STATE_MSFT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5919,9 +5520,6 @@ pub struct ControllerModelStateMSFT { } impl ControllerModelStateMSFT { pub const TYPE: StructureType = StructureType::CONTROLLER_MODEL_STATE_MSFT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5945,9 +5543,6 @@ pub struct SystemColorSpacePropertiesFB { } impl SystemColorSpacePropertiesFB { pub const TYPE: StructureType = StructureType::SYSTEM_COLOR_SPACE_PROPERTIES_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -5971,9 +5566,6 @@ pub struct SystemSpatialEntityPropertiesFB { } impl SystemSpatialEntityPropertiesFB { pub const TYPE: StructureType = StructureType::SYSTEM_SPATIAL_ENTITY_PROPERTIES_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -5987,9 +5579,6 @@ pub struct SpatialAnchorCreateInfoFB { } impl SpatialAnchorCreateInfoFB { pub const TYPE: StructureType = StructureType::SPATIAL_ANCHOR_CREATE_INFO_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6003,9 +5592,6 @@ pub struct SpaceComponentStatusSetInfoFB { } impl SpaceComponentStatusSetInfoFB { pub const TYPE: StructureType = StructureType::SPACE_COMPONENT_STATUS_SET_INFO_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6018,9 +5604,6 @@ pub struct SpaceComponentStatusFB { } impl SpaceComponentStatusFB { pub const TYPE: StructureType = StructureType::SPACE_COMPONENT_STATUS_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6047,9 +5630,6 @@ pub struct EventDataSpatialAnchorCreateCompleteFB { } impl EventDataSpatialAnchorCreateCompleteFB { pub const TYPE: StructureType = StructureType::EVENT_DATA_SPATIAL_ANCHOR_CREATE_COMPLETE_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6066,9 +5646,6 @@ pub struct EventDataSpaceSetStatusCompleteFB { } impl EventDataSpaceSetStatusCompleteFB { pub const TYPE: StructureType = StructureType::EVENT_DATA_SPACE_SET_STATUS_COMPLETE_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6079,9 +5656,6 @@ pub struct FoveationProfileCreateInfoFB { } impl FoveationProfileCreateInfoFB { pub const TYPE: StructureType = StructureType::FOVEATION_PROFILE_CREATE_INFO_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6105,9 +5679,6 @@ pub struct SwapchainCreateInfoFoveationFB { } impl SwapchainCreateInfoFoveationFB { pub const TYPE: StructureType = StructureType::SWAPCHAIN_CREATE_INFO_FOVEATION_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6132,9 +5703,6 @@ pub struct SwapchainStateFoveationFB { } impl SwapchainStateFoveationFB { pub const TYPE: StructureType = StructureType::SWAPCHAIN_STATE_FOVEATION_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6160,9 +5728,6 @@ pub struct SwapchainImageFoveationVulkanFB { } impl SwapchainImageFoveationVulkanFB { pub const TYPE: StructureType = StructureType::SWAPCHAIN_IMAGE_FOVEATION_VULKAN_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6188,9 +5753,6 @@ pub struct FoveationLevelProfileCreateInfoFB { } impl FoveationLevelProfileCreateInfoFB { pub const TYPE: StructureType = StructureType::FOVEATION_LEVEL_PROFILE_CREATE_INFO_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6237,9 +5799,6 @@ pub struct HandTrackingMeshFB { } impl HandTrackingMeshFB { pub const TYPE: StructureType = StructureType::HAND_TRACKING_MESH_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6266,9 +5825,6 @@ pub struct HandTrackingScaleFB { } impl HandTrackingScaleFB { pub const TYPE: StructureType = StructureType::HAND_TRACKING_SCALE_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6297,9 +5853,6 @@ pub struct HandTrackingAimStateFB { } impl HandTrackingAimStateFB { pub const TYPE: StructureType = StructureType::HAND_TRACKING_AIM_STATE_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6331,9 +5884,6 @@ pub struct HandTrackingCapsulesStateFB { } impl HandTrackingCapsulesStateFB { pub const TYPE: StructureType = StructureType::HAND_TRACKING_CAPSULES_STATE_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6357,9 +5907,6 @@ pub struct RenderModelPathInfoFB { } impl RenderModelPathInfoFB { pub const TYPE: StructureType = StructureType::RENDER_MODEL_PATH_INFO_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6387,9 +5934,6 @@ pub struct RenderModelPropertiesFB { } impl RenderModelPropertiesFB { pub const TYPE: StructureType = StructureType::RENDER_MODEL_PROPERTIES_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6415,9 +5959,6 @@ pub struct RenderModelBufferFB { } impl RenderModelBufferFB { pub const TYPE: StructureType = StructureType::RENDER_MODEL_BUFFER_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6441,9 +5982,6 @@ pub struct RenderModelLoadInfoFB { } impl RenderModelLoadInfoFB { pub const TYPE: StructureType = StructureType::RENDER_MODEL_LOAD_INFO_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6467,9 +6005,6 @@ pub struct SystemRenderModelPropertiesFB { } impl SystemRenderModelPropertiesFB { pub const TYPE: StructureType = StructureType::SYSTEM_RENDER_MODEL_PROPERTIES_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6493,9 +6028,6 @@ pub struct RenderModelCapabilitiesRequestFB { } impl RenderModelCapabilitiesRequestFB { pub const TYPE: StructureType = StructureType::RENDER_MODEL_CAPABILITIES_REQUEST_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6537,9 +6069,6 @@ pub struct SpaceQueryInfoFB { } impl SpaceQueryInfoFB { pub const TYPE: StructureType = StructureType::SPACE_QUERY_INFO_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6551,9 +6080,6 @@ pub struct SpaceStorageLocationFilterInfoFB { } impl SpaceStorageLocationFilterInfoFB { pub const TYPE: StructureType = StructureType::SPACE_STORAGE_LOCATION_FILTER_INFO_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6566,9 +6092,6 @@ pub struct SpaceUuidFilterInfoFB { } impl SpaceUuidFilterInfoFB { pub const TYPE: StructureType = StructureType::SPACE_UUID_FILTER_INFO_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6580,9 +6103,6 @@ pub struct SpaceComponentFilterInfoFB { } impl SpaceComponentFilterInfoFB { pub const TYPE: StructureType = StructureType::SPACE_COMPONENT_FILTER_INFO_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6603,9 +6123,6 @@ pub struct SpaceQueryResultsFB { } impl SpaceQueryResultsFB { pub const TYPE: StructureType = StructureType::SPACE_QUERY_RESULTS_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6629,9 +6146,6 @@ pub struct EventDataSpaceQueryResultsAvailableFB { } impl EventDataSpaceQueryResultsAvailableFB { pub const TYPE: StructureType = StructureType::EVENT_DATA_SPACE_QUERY_RESULTS_AVAILABLE_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6644,9 +6158,6 @@ pub struct EventDataSpaceQueryCompleteFB { } impl EventDataSpaceQueryCompleteFB { pub const TYPE: StructureType = StructureType::EVENT_DATA_SPACE_QUERY_COMPLETE_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6660,9 +6171,6 @@ pub struct SpaceSaveInfoFB { } impl SpaceSaveInfoFB { pub const TYPE: StructureType = StructureType::SPACE_SAVE_INFO_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6675,9 +6183,6 @@ pub struct SpaceEraseInfoFB { } impl SpaceEraseInfoFB { pub const TYPE: StructureType = StructureType::SPACE_ERASE_INFO_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6693,9 +6198,6 @@ pub struct EventDataSpaceSaveCompleteFB { } impl EventDataSpaceSaveCompleteFB { pub const TYPE: StructureType = StructureType::EVENT_DATA_SPACE_SAVE_COMPLETE_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6711,9 +6213,6 @@ pub struct EventDataSpaceEraseCompleteFB { } impl EventDataSpaceEraseCompleteFB { pub const TYPE: StructureType = StructureType::EVENT_DATA_SPACE_ERASE_COMPLETE_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6727,9 +6226,6 @@ pub struct SpaceContainerFB { } impl SpaceContainerFB { pub const TYPE: StructureType = StructureType::SPACE_CONTAINER_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug, Default, PartialEq)] @@ -6766,9 +6262,6 @@ pub struct SemanticLabelsFB { } impl SemanticLabelsFB { pub const TYPE: StructureType = StructureType::SEMANTIC_LABELS_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6784,9 +6277,6 @@ pub struct RoomLayoutFB { } impl RoomLayoutFB { pub const TYPE: StructureType = StructureType::ROOM_LAYOUT_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6800,9 +6290,6 @@ pub struct Boundary2DFB { } impl Boundary2DFB { pub const TYPE: StructureType = StructureType::BOUNDARY_2D_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6814,9 +6301,6 @@ pub struct SystemKeyboardTrackingPropertiesFB { } impl SystemKeyboardTrackingPropertiesFB { pub const TYPE: StructureType = StructureType::SYSTEM_KEYBOARD_TRACKING_PROPERTIES_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6849,9 +6333,6 @@ pub struct KeyboardSpaceCreateInfoFB { } impl KeyboardSpaceCreateInfoFB { pub const TYPE: StructureType = StructureType::KEYBOARD_SPACE_CREATE_INFO_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6875,9 +6356,6 @@ pub struct KeyboardTrackingQueryFB { } impl KeyboardTrackingQueryFB { pub const TYPE: StructureType = StructureType::KEYBOARD_TRACKING_QUERY_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6902,9 +6380,6 @@ pub struct CompositionLayerDepthTestVARJO { } impl CompositionLayerDepthTestVARJO { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_DEPTH_TEST_VARJO; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6916,9 +6391,6 @@ pub struct ViewLocateFoveatedRenderingVARJO { } impl ViewLocateFoveatedRenderingVARJO { pub const TYPE: StructureType = StructureType::VIEW_LOCATE_FOVEATED_RENDERING_VARJO; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6930,9 +6402,6 @@ pub struct FoveatedViewConfigurationViewVARJO { } impl FoveatedViewConfigurationViewVARJO { pub const TYPE: StructureType = StructureType::FOVEATED_VIEW_CONFIGURATION_VIEW_VARJO; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6956,9 +6425,6 @@ pub struct SystemFoveatedRenderingPropertiesVARJO { } impl SystemFoveatedRenderingPropertiesVARJO { pub const TYPE: StructureType = StructureType::SYSTEM_FOVEATED_RENDERING_PROPERTIES_VARJO; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -6982,9 +6448,6 @@ pub struct CompositionLayerReprojectionInfoMSFT { } impl CompositionLayerReprojectionInfoMSFT { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_REPROJECTION_INFO_MSFT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -6999,9 +6462,6 @@ pub struct CompositionLayerReprojectionPlaneOverrideMSFT { impl CompositionLayerReprojectionPlaneOverrideMSFT { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_REPROJECTION_PLANE_OVERRIDE_MSFT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -7018,9 +6478,6 @@ pub struct TriangleMeshCreateInfoFB { } impl TriangleMeshCreateInfoFB { pub const TYPE: StructureType = StructureType::TRIANGLE_MESH_CREATE_INFO_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -7032,9 +6489,6 @@ pub struct SystemPassthroughPropertiesFB { } impl SystemPassthroughPropertiesFB { pub const TYPE: StructureType = StructureType::SYSTEM_PASSTHROUGH_PROPERTIES_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -7046,9 +6500,6 @@ pub struct SystemPassthroughProperties2FB { } impl SystemPassthroughProperties2FB { pub const TYPE: StructureType = StructureType::SYSTEM_PASSTHROUGH_PROPERTIES2_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -7060,9 +6511,6 @@ pub struct PassthroughCreateInfoFB { } impl PassthroughCreateInfoFB { pub const TYPE: StructureType = StructureType::PASSTHROUGH_CREATE_INFO_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -7076,9 +6524,6 @@ pub struct PassthroughLayerCreateInfoFB { } impl PassthroughLayerCreateInfoFB { pub const TYPE: StructureType = StructureType::PASSTHROUGH_LAYER_CREATE_INFO_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -7092,9 +6537,6 @@ pub struct CompositionLayerPassthroughFB { } impl CompositionLayerPassthroughFB { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_PASSTHROUGH_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -7110,9 +6552,6 @@ pub struct GeometryInstanceCreateInfoFB { } impl GeometryInstanceCreateInfoFB { pub const TYPE: StructureType = StructureType::GEOMETRY_INSTANCE_CREATE_INFO_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -7127,9 +6566,6 @@ pub struct GeometryInstanceTransformFB { } impl GeometryInstanceTransformFB { pub const TYPE: StructureType = StructureType::GEOMETRY_INSTANCE_TRANSFORM_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -7142,9 +6578,6 @@ pub struct PassthroughStyleFB { } impl PassthroughStyleFB { pub const TYPE: StructureType = StructureType::PASSTHROUGH_STYLE_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -7156,9 +6589,6 @@ pub struct PassthroughColorMapMonoToRgbaFB { } impl PassthroughColorMapMonoToRgbaFB { pub const TYPE: StructureType = StructureType::PASSTHROUGH_COLOR_MAP_MONO_TO_RGBA_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -7170,9 +6600,6 @@ pub struct PassthroughColorMapMonoToMonoFB { } impl PassthroughColorMapMonoToMonoFB { pub const TYPE: StructureType = StructureType::PASSTHROUGH_COLOR_MAP_MONO_TO_MONO_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -7186,9 +6613,6 @@ pub struct PassthroughBrightnessContrastSaturationFB { } impl PassthroughBrightnessContrastSaturationFB { pub const TYPE: StructureType = StructureType::PASSTHROUGH_BRIGHTNESS_CONTRAST_SATURATION_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -7200,9 +6624,6 @@ pub struct EventDataPassthroughStateChangedFB { } impl EventDataPassthroughStateChangedFB { pub const TYPE: StructureType = StructureType::EVENT_DATA_PASSTHROUGH_STATE_CHANGED_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -7215,9 +6636,6 @@ pub struct PassthroughKeyboardHandsIntensityFB { } impl PassthroughKeyboardHandsIntensityFB { pub const TYPE: StructureType = StructureType::PASSTHROUGH_KEYBOARD_HANDS_INTENSITY_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -7236,9 +6654,6 @@ pub struct SpatialAnchorPersistenceInfoMSFT { } impl SpatialAnchorPersistenceInfoMSFT { pub const TYPE: StructureType = StructureType::SPATIAL_ANCHOR_PERSISTENCE_INFO_MSFT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -7252,9 +6667,6 @@ pub struct SpatialAnchorFromPersistedAnchorCreateInfoMSFT { impl SpatialAnchorFromPersistedAnchorCreateInfoMSFT { pub const TYPE: StructureType = StructureType::SPATIAL_ANCHOR_FROM_PERSISTED_ANCHOR_CREATE_INFO_MSFT; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -7266,9 +6678,6 @@ pub struct FacialTrackerCreateInfoHTC { } impl FacialTrackerCreateInfoHTC { pub const TYPE: StructureType = StructureType::FACIAL_TRACKER_CREATE_INFO_HTC; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -7281,9 +6690,6 @@ pub struct SystemFacialTrackingPropertiesHTC { } impl SystemFacialTrackingPropertiesHTC { pub const TYPE: StructureType = StructureType::SYSTEM_FACIAL_TRACKING_PROPERTIES_HTC; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -7310,9 +6716,6 @@ pub struct FacialExpressionsHTC { } impl FacialExpressionsHTC { pub const TYPE: StructureType = StructureType::FACIAL_EXPRESSIONS_HTC; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -7325,9 +6728,6 @@ pub struct ViveTrackerPathsHTCX { } impl ViveTrackerPathsHTCX { pub const TYPE: StructureType = StructureType::VIVE_TRACKER_PATHS_HTCX; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -7351,9 +6751,6 @@ pub struct EventDataViveTrackerConnectedHTCX { } impl EventDataViveTrackerConnectedHTCX { pub const TYPE: StructureType = StructureType::EVENT_DATA_VIVE_TRACKER_CONNECTED_HTCX; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -7372,9 +6769,6 @@ pub struct CompositionLayerSpaceWarpInfoFB { } impl CompositionLayerSpaceWarpInfoFB { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_SPACE_WARP_INFO_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -7387,9 +6781,6 @@ pub struct SystemSpaceWarpPropertiesFB { } impl SystemSpaceWarpPropertiesFB { pub const TYPE: StructureType = StructureType::SYSTEM_SPACE_WARP_PROPERTIES_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -7413,9 +6804,6 @@ pub struct SystemMarkerTrackingPropertiesVARJO { } impl SystemMarkerTrackingPropertiesVARJO { pub const TYPE: StructureType = StructureType::SYSTEM_MARKER_TRACKING_PROPERTIES_VARJO; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -7442,9 +6830,6 @@ pub struct EventDataMarkerTrackingUpdateVARJO { } impl EventDataMarkerTrackingUpdateVARJO { pub const TYPE: StructureType = StructureType::EVENT_DATA_MARKER_TRACKING_UPDATE_VARJO; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -7457,9 +6842,6 @@ pub struct MarkerSpaceCreateInfoVARJO { } impl MarkerSpaceCreateInfoVARJO { pub const TYPE: StructureType = StructureType::MARKER_SPACE_CREATE_INFO_VARJO; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -7477,9 +6859,6 @@ pub struct DigitalLensControlALMALENCE { } impl DigitalLensControlALMALENCE { pub const TYPE: StructureType = StructureType::DIGITAL_LENS_CONTROL_ALMALENCE; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -7491,9 +6870,6 @@ pub struct CompositionLayerSettingsFB { } impl CompositionLayerSettingsFB { pub const TYPE: StructureType = StructureType::COMPOSITION_LAYER_SETTINGS_FB; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -7505,9 +6881,6 @@ pub struct PerformanceMetricsStateMETA { } impl PerformanceMetricsStateMETA { pub const TYPE: StructureType = StructureType::PERFORMANCE_METRICS_STATE_META; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[repr(C)] #[derive(Copy, Clone, Debug)] @@ -7522,9 +6895,6 @@ pub struct PerformanceMetricsCounterMETA { } impl PerformanceMetricsCounterMETA { pub const TYPE: StructureType = StructureType::PERFORMANCE_METRICS_COUNTER_META; - pub unsafe fn as_ptr_iterator(&mut self) -> impl Iterator { - ptr_chain_iter(self) - } } #[doc = r" Function pointer prototypes"] pub mod pfn { From d4f05a965db71212d3da18096008d9384d0cf63c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacopo=20Lib=C3=A8?= Date: Fri, 26 May 2023 15:18:24 +0200 Subject: [PATCH 6/9] Export all builders --- openxr/src/lib.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/openxr/src/lib.rs b/openxr/src/lib.rs index 144e4682..261db168 100644 --- a/openxr/src/lib.rs +++ b/openxr/src/lib.rs @@ -39,15 +39,9 @@ mod vive_tracker_paths; pub use vive_tracker_paths::*; mod display_refresh_rate; mod passthrough; +pub use builder::*; pub use passthrough::*; -pub use builder::{ - CompositionLayerBase, CompositionLayerCubeKHR, CompositionLayerCylinderKHR, - CompositionLayerDepthInfoKHR, CompositionLayerEquirectKHR, CompositionLayerProjection, - CompositionLayerProjectionView, CompositionLayerQuad, HapticBase, HapticVibration, - SwapchainSubImage, -}; - pub type Result = std::result::Result; // Reserved semantic paths From 0c942e1d901763c2baf6f37a4a78a5a5c4d1bb7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacopo=20Lib=C3=A8?= Date: Fri, 26 May 2023 16:33:02 +0200 Subject: [PATCH 7/9] Reworked polymorphic structextends --- generator/src/main.rs | 88 +++++++++---- openxr/src/generated.rs | 275 +++++++++++++++++++++++++++++++--------- sys/src/generated.rs | 14 +- 3 files changed, 283 insertions(+), 94 deletions(-) diff --git a/generator/src/main.rs b/generator/src/main.rs index e6eb01c9..ec7d0054 100644 --- a/generator/src/main.rs +++ b/generator/src/main.rs @@ -580,7 +580,7 @@ impl Parser { } } let parent: Option = attr(attrs, "parentstruct").map(|x| x.into()); - let extends: Option> = attr(attrs, "structextends").map(|x| Rc::from(x)); + let extends: Option> = attr(attrs, "structextends").map(Rc::from); if let Some(ref parent) = parent { self.base_headers .entry(parent.clone()) @@ -1633,24 +1633,6 @@ impl Parser { out } - /// Generates a push_next function for structures that can be extended through the `next` pointer - fn generate_next_fn(extension_trait_ident: &Ident) -> TokenStream { - quote! { - #[inline] - #[doc = "Chains a structure as the next member of this one"] - pub fn push_next(mut self, next: &'a mut T) -> Self { - unsafe { - let other: &mut sys::BaseOutStructure = mem::transmute(next); - let next_ptr = <*mut sys::BaseOutStructure>::cast((*other).next); - let last_next = sys::ptr_chain_iter(other).last().unwrap(); - (*last_next).next = self.inner.next as _; - self.inner.next = next_ptr; - } - self - } - } - } - fn generate_polymorphic_builders( &self, meta: &HashMap<&str, StructMeta>, @@ -1665,6 +1647,8 @@ impl Parser { base_meta |= *meta.get(&name[..]).unwrap(); } + let extends_name = format_ident!("Extends{}", base_ident); + let impl_trait_name = format_ident!("Impl{}", base_ident); let (type_params, type_args, marker, marker_init) = base_meta.type_params(); let builders = children.iter().map(|name| { let ident = xr_ty_name(name); @@ -1672,6 +1656,8 @@ impl Parser { let conds = conditions(name, s.extension.as_ref().map(|x| &x[..])); let inits = self.generate_builder_inits(s); let setters = self.generate_setters(meta, simple, s); + let next_fn = generate_next_fn(&extends_name, NextFnType::TraitImpl); + quote! { #conds #[derive(Copy, Clone)] @@ -1734,12 +1720,14 @@ impl Parser { Self::new() } } + #conds + impl #type_params #impl_trait_name<'a> for #ident #type_args { + #next_fn + } } }); - let extends_name = format_ident!("Extends{}", base_ident); - let next_fn = Self::generate_next_fn(&extends_name); - + let next_fn = generate_next_fn(&extends_name, NextFnType::TraitDef); quote! { #[repr(transparent)] pub struct #base_ident #type_params { @@ -1747,7 +1735,7 @@ impl Parser { #marker } pub unsafe trait #extends_name {} - impl #type_params #base_ident #type_args { + pub trait #impl_trait_name<'a> { #next_fn } #(#builders)* @@ -1902,7 +1890,7 @@ impl Parser { // Adds a `push_next` method to the builder if the struct is a root struct // based on Ash let next_fn = if is_root_struct { - Self::generate_next_fn(&extends_name) + generate_next_fn(&extends_name, NextFnType::Fn) } else { quote!() }; @@ -2182,6 +2170,12 @@ struct Extension { commands: Vec, } +enum NextFnType { + Fn, + TraitDef, + TraitImpl, +} + fn attr<'a>(attrs: &'a [OwnedAttribute], name: &str) -> Option<&'a str> { attrs .iter() @@ -2373,3 +2367,49 @@ fn base_header_ty(base_name: &str) -> Ident { Span::call_site(), ) } + +/// Generates a push_next function for structures that can be extended through the `next` pointer +fn generate_next_fn(extension_trait_ident: &Ident, fn_type: NextFnType) -> TokenStream { + let docs = match fn_type { + NextFnType::TraitImpl => quote!(), + _ => quote!(#[doc = "Chains a structure as the next member of this one"]), + }; + + let fn_body = match fn_type { + NextFnType::TraitDef => quote!(;), + _ => quote! { + { + unsafe { + let other: &mut sys::BaseOutStructure = mem::transmute(next); + let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); + let last_next = sys::ptr_chain_iter(other).last().unwrap(); + (*last_next).next = self.inner.next as _; + self.inner.next = next_ptr; + } + self + } + }, + }; + + let fn_accessor = match fn_type { + NextFnType::Fn => quote!(pub), + _ => quote!(), + }; + + let self_pattern = match fn_type { + NextFnType::TraitDef => quote!(self), + _ => quote!(mut self), + }; + + let inlining = match fn_type { + NextFnType::TraitDef => quote!(), + _ => quote!(#[inline]), + }; + + quote! { + #inlining + #docs + #fn_accessor fn push_next(#self_pattern, next: &'a mut T) -> Self + #fn_body + } +} diff --git a/openxr/src/generated.rs b/openxr/src/generated.rs index a921ff2d..aec1578b 100644 --- a/openxr/src/generated.rs +++ b/openxr/src/generated.rs @@ -4511,7 +4511,7 @@ pub(crate) mod builder { ) -> Self { unsafe { let other: &mut sys::BaseOutStructure = mem::transmute(next); - let next_ptr = <*mut sys::BaseOutStructure>::cast((*other).next); + let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); let last_next = sys::ptr_chain_iter(other).last().unwrap(); (*last_next).next = self.inner.next as _; self.inner.next = next_ptr; @@ -4866,19 +4866,9 @@ pub(crate) mod builder { _marker: PhantomData<&'a G>, } pub unsafe trait ExtendsCompositionLayerBase {} - impl<'a, G: Graphics> CompositionLayerBase<'a, G> { - #[inline] + pub trait ImplCompositionLayerBase<'a> { #[doc = "Chains a structure as the next member of this one"] - pub fn push_next(mut self, next: &'a mut T) -> Self { - unsafe { - let other: &mut sys::BaseOutStructure = mem::transmute(next); - let next_ptr = <*mut sys::BaseOutStructure>::cast((*other).next); - let last_next = sys::ptr_chain_iter(other).last().unwrap(); - (*last_next).next = self.inner.next as _; - self.inner.next = next_ptr; - } - self - } + fn push_next(self, next: &'a mut T) -> Self; } #[derive(Copy, Clone)] #[repr(transparent)] @@ -4947,6 +4937,19 @@ pub(crate) mod builder { Self::new() } } + impl<'a, G: Graphics> ImplCompositionLayerBase<'a> for CompositionLayerProjection<'a, G> { + #[inline] + fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let other: &mut sys::BaseOutStructure = mem::transmute(next); + let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); + let last_next = sys::ptr_chain_iter(other).last().unwrap(); + (*last_next).next = self.inner.next as _; + self.inner.next = next_ptr; + } + self + } + } #[derive(Copy, Clone)] #[repr(transparent)] pub struct CompositionLayerQuad<'a, G: Graphics> { @@ -5028,6 +5031,19 @@ pub(crate) mod builder { Self::new() } } + impl<'a, G: Graphics> ImplCompositionLayerBase<'a> for CompositionLayerQuad<'a, G> { + #[inline] + fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let other: &mut sys::BaseOutStructure = mem::transmute(next); + let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); + let last_next = sys::ptr_chain_iter(other).last().unwrap(); + (*last_next).next = self.inner.next as _; + self.inner.next = next_ptr; + } + self + } + } #[derive(Copy, Clone)] #[repr(transparent)] pub struct CompositionLayerCylinderKHR<'a, G: Graphics> { @@ -5119,6 +5135,19 @@ pub(crate) mod builder { Self::new() } } + impl<'a, G: Graphics> ImplCompositionLayerBase<'a> for CompositionLayerCylinderKHR<'a, G> { + #[inline] + fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let other: &mut sys::BaseOutStructure = mem::transmute(next); + let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); + let last_next = sys::ptr_chain_iter(other).last().unwrap(); + (*last_next).next = self.inner.next as _; + self.inner.next = next_ptr; + } + self + } + } #[derive(Copy, Clone)] #[repr(transparent)] pub struct CompositionLayerCubeKHR<'a, G: Graphics> { @@ -5200,6 +5229,19 @@ pub(crate) mod builder { Self::new() } } + impl<'a, G: Graphics> ImplCompositionLayerBase<'a> for CompositionLayerCubeKHR<'a, G> { + #[inline] + fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let other: &mut sys::BaseOutStructure = mem::transmute(next); + let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); + let last_next = sys::ptr_chain_iter(other).last().unwrap(); + (*last_next).next = self.inner.next as _; + self.inner.next = next_ptr; + } + self + } + } #[derive(Copy, Clone)] #[repr(transparent)] pub struct CompositionLayerEquirectKHR<'a, G: Graphics> { @@ -5291,6 +5333,19 @@ pub(crate) mod builder { Self::new() } } + impl<'a, G: Graphics> ImplCompositionLayerBase<'a> for CompositionLayerEquirectKHR<'a, G> { + #[inline] + fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let other: &mut sys::BaseOutStructure = mem::transmute(next); + let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); + let last_next = sys::ptr_chain_iter(other).last().unwrap(); + (*last_next).next = self.inner.next as _; + self.inner.next = next_ptr; + } + self + } + } #[derive(Copy, Clone)] #[repr(transparent)] pub struct CompositionLayerEquirect2KHR<'a, G: Graphics> { @@ -5387,19 +5442,12 @@ pub(crate) mod builder { Self::new() } } - #[repr(transparent)] - pub struct HapticBase<'a> { - inner: sys::HapticBaseHeader, - _marker: PhantomData<&'a ()>, - } - pub unsafe trait ExtendsHapticBase {} - impl<'a> HapticBase<'a> { + impl<'a, G: Graphics> ImplCompositionLayerBase<'a> for CompositionLayerEquirect2KHR<'a, G> { #[inline] - #[doc = "Chains a structure as the next member of this one"] - pub fn push_next(mut self, next: &'a mut T) -> Self { + fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let other: &mut sys::BaseOutStructure = mem::transmute(next); - let next_ptr = <*mut sys::BaseOutStructure>::cast((*other).next); + let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); let last_next = sys::ptr_chain_iter(other).last().unwrap(); (*last_next).next = self.inner.next as _; self.inner.next = next_ptr; @@ -5407,6 +5455,16 @@ pub(crate) mod builder { self } } + #[repr(transparent)] + pub struct HapticBase<'a> { + inner: sys::HapticBaseHeader, + _marker: PhantomData<&'a ()>, + } + pub unsafe trait ExtendsHapticBase {} + pub trait ImplHapticBase<'a> { + #[doc = "Chains a structure as the next member of this one"] + fn push_next(self, next: &'a mut T) -> Self; + } #[derive(Copy, Clone)] #[repr(transparent)] pub struct HapticVibration<'a> { @@ -5473,19 +5531,12 @@ pub(crate) mod builder { Self::new() } } - #[repr(transparent)] - pub struct BindingModificationBase<'a> { - inner: sys::BindingModificationBaseHeaderKHR, - _marker: PhantomData<&'a ()>, - } - pub unsafe trait ExtendsBindingModificationBase {} - impl<'a> BindingModificationBase<'a> { + impl<'a> ImplHapticBase<'a> for HapticVibration<'a> { #[inline] - #[doc = "Chains a structure as the next member of this one"] - pub fn push_next(mut self, next: &'a mut T) -> Self { + fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let other: &mut sys::BaseOutStructure = mem::transmute(next); - let next_ptr = <*mut sys::BaseOutStructure>::cast((*other).next); + let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); let last_next = sys::ptr_chain_iter(other).last().unwrap(); (*last_next).next = self.inner.next as _; self.inner.next = next_ptr; @@ -5493,6 +5544,16 @@ pub(crate) mod builder { self } } + #[repr(transparent)] + pub struct BindingModificationBase<'a> { + inner: sys::BindingModificationBaseHeaderKHR, + _marker: PhantomData<&'a ()>, + } + pub unsafe trait ExtendsBindingModificationBase {} + pub trait ImplBindingModificationBase<'a> { + #[doc = "Chains a structure as the next member of this one"] + fn push_next(self, next: &'a mut T) -> Self; + } #[derive(Copy, Clone)] #[repr(transparent)] pub struct InteractionProfileDpadBindingEXT<'a> { @@ -5589,6 +5650,19 @@ pub(crate) mod builder { Self::new() } } + impl<'a> ImplBindingModificationBase<'a> for InteractionProfileDpadBindingEXT<'a> { + #[inline] + fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let other: &mut sys::BaseOutStructure = mem::transmute(next); + let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); + let last_next = sys::ptr_chain_iter(other).last().unwrap(); + (*last_next).next = self.inner.next as _; + self.inner.next = next_ptr; + } + self + } + } #[derive(Copy, Clone)] #[repr(transparent)] pub struct InteractionProfileAnalogThresholdVALVE<'a> { @@ -5670,19 +5744,12 @@ pub(crate) mod builder { Self::new() } } - #[repr(transparent)] - pub struct SwapchainStateBase<'a> { - inner: sys::SwapchainStateBaseHeaderFB, - _marker: PhantomData<&'a ()>, - } - pub unsafe trait ExtendsSwapchainStateBase {} - impl<'a> SwapchainStateBase<'a> { + impl<'a> ImplBindingModificationBase<'a> for InteractionProfileAnalogThresholdVALVE<'a> { #[inline] - #[doc = "Chains a structure as the next member of this one"] - pub fn push_next(mut self, next: &'a mut T) -> Self { + fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let other: &mut sys::BaseOutStructure = mem::transmute(next); - let next_ptr = <*mut sys::BaseOutStructure>::cast((*other).next); + let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); let last_next = sys::ptr_chain_iter(other).last().unwrap(); (*last_next).next = self.inner.next as _; self.inner.next = next_ptr; @@ -5690,6 +5757,16 @@ pub(crate) mod builder { self } } + #[repr(transparent)] + pub struct SwapchainStateBase<'a> { + inner: sys::SwapchainStateBaseHeaderFB, + _marker: PhantomData<&'a ()>, + } + pub unsafe trait ExtendsSwapchainStateBase {} + pub trait ImplSwapchainStateBase<'a> { + #[doc = "Chains a structure as the next member of this one"] + fn push_next(self, next: &'a mut T) -> Self; + } #[cfg(target_os = "android")] #[derive(Copy, Clone)] #[repr(transparent)] @@ -5755,6 +5832,20 @@ pub(crate) mod builder { Self::new() } } + #[cfg(target_os = "android")] + impl<'a> ImplSwapchainStateBase<'a> for SwapchainStateAndroidSurfaceDimensionsFB<'a> { + #[inline] + fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let other: &mut sys::BaseOutStructure = mem::transmute(next); + let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); + let last_next = sys::ptr_chain_iter(other).last().unwrap(); + (*last_next).next = self.inner.next as _; + self.inner.next = next_ptr; + } + self + } + } #[derive(Copy, Clone)] #[repr(transparent)] pub struct SwapchainStateSamplerOpenGLESFB<'a> { @@ -5856,6 +5947,19 @@ pub(crate) mod builder { Self::new() } } + impl<'a> ImplSwapchainStateBase<'a> for SwapchainStateSamplerOpenGLESFB<'a> { + #[inline] + fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let other: &mut sys::BaseOutStructure = mem::transmute(next); + let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); + let last_next = sys::ptr_chain_iter(other).last().unwrap(); + (*last_next).next = self.inner.next as _; + self.inner.next = next_ptr; + } + self + } + } #[derive(Copy, Clone)] #[repr(transparent)] pub struct SwapchainStateSamplerVulkanFB<'a> { @@ -5962,6 +6066,19 @@ pub(crate) mod builder { Self::new() } } + impl<'a> ImplSwapchainStateBase<'a> for SwapchainStateSamplerVulkanFB<'a> { + #[inline] + fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let other: &mut sys::BaseOutStructure = mem::transmute(next); + let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); + let last_next = sys::ptr_chain_iter(other).last().unwrap(); + (*last_next).next = self.inner.next as _; + self.inner.next = next_ptr; + } + self + } + } #[derive(Copy, Clone)] #[repr(transparent)] pub struct SwapchainStateFoveationFB<'a> { @@ -6023,19 +6140,12 @@ pub(crate) mod builder { Self::new() } } - #[repr(transparent)] - pub struct SpaceQueryInfoBase<'a> { - inner: sys::SpaceQueryInfoBaseHeaderFB, - _marker: PhantomData<&'a ()>, - } - pub unsafe trait ExtendsSpaceQueryInfoBase {} - impl<'a> SpaceQueryInfoBase<'a> { + impl<'a> ImplSwapchainStateBase<'a> for SwapchainStateFoveationFB<'a> { #[inline] - #[doc = "Chains a structure as the next member of this one"] - pub fn push_next(mut self, next: &'a mut T) -> Self { + fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let other: &mut sys::BaseOutStructure = mem::transmute(next); - let next_ptr = <*mut sys::BaseOutStructure>::cast((*other).next); + let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); let last_next = sys::ptr_chain_iter(other).last().unwrap(); (*last_next).next = self.inner.next as _; self.inner.next = next_ptr; @@ -6043,6 +6153,16 @@ pub(crate) mod builder { self } } + #[repr(transparent)] + pub struct SpaceQueryInfoBase<'a> { + inner: sys::SpaceQueryInfoBaseHeaderFB, + _marker: PhantomData<&'a ()>, + } + pub unsafe trait ExtendsSpaceQueryInfoBase {} + pub trait ImplSpaceQueryInfoBase<'a> { + #[doc = "Chains a structure as the next member of this one"] + fn push_next(self, next: &'a mut T) -> Self; + } #[derive(Copy, Clone)] #[repr(transparent)] pub struct SpaceQueryInfoFB<'a> { @@ -6119,19 +6239,12 @@ pub(crate) mod builder { Self::new() } } - #[repr(transparent)] - pub struct SpaceFilterInfoBase<'a> { - inner: sys::SpaceFilterInfoBaseHeaderFB, - _marker: PhantomData<&'a ()>, - } - pub unsafe trait ExtendsSpaceFilterInfoBase {} - impl<'a> SpaceFilterInfoBase<'a> { + impl<'a> ImplSpaceQueryInfoBase<'a> for SpaceQueryInfoFB<'a> { #[inline] - #[doc = "Chains a structure as the next member of this one"] - pub fn push_next(mut self, next: &'a mut T) -> Self { + fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let other: &mut sys::BaseOutStructure = mem::transmute(next); - let next_ptr = <*mut sys::BaseOutStructure>::cast((*other).next); + let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); let last_next = sys::ptr_chain_iter(other).last().unwrap(); (*last_next).next = self.inner.next as _; self.inner.next = next_ptr; @@ -6139,6 +6252,16 @@ pub(crate) mod builder { self } } + #[repr(transparent)] + pub struct SpaceFilterInfoBase<'a> { + inner: sys::SpaceFilterInfoBaseHeaderFB, + _marker: PhantomData<&'a ()>, + } + pub unsafe trait ExtendsSpaceFilterInfoBase {} + pub trait ImplSpaceFilterInfoBase<'a> { + #[doc = "Chains a structure as the next member of this one"] + fn push_next(self, next: &'a mut T) -> Self; + } #[derive(Copy, Clone)] #[repr(transparent)] pub struct SpaceUuidFilterInfoFB<'a> { @@ -6196,6 +6319,19 @@ pub(crate) mod builder { Self::new() } } + impl<'a> ImplSpaceFilterInfoBase<'a> for SpaceUuidFilterInfoFB<'a> { + #[inline] + fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let other: &mut sys::BaseOutStructure = mem::transmute(next); + let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); + let last_next = sys::ptr_chain_iter(other).last().unwrap(); + (*last_next).next = self.inner.next as _; + self.inner.next = next_ptr; + } + self + } + } #[derive(Copy, Clone)] #[repr(transparent)] pub struct SpaceComponentFilterInfoFB<'a> { @@ -6252,4 +6388,17 @@ pub(crate) mod builder { Self::new() } } + impl<'a> ImplSpaceFilterInfoBase<'a> for SpaceComponentFilterInfoFB<'a> { + #[inline] + fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let other: &mut sys::BaseOutStructure = mem::transmute(next); + let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); + let last_next = sys::ptr_chain_iter(other).last().unwrap(); + (*last_next).next = self.inner.next as _; + self.inner.next = next_ptr; + } + self + } + } } diff --git a/sys/src/generated.rs b/sys/src/generated.rs index 91768080..bbbf49bb 100644 --- a/sys/src/generated.rs +++ b/sys/src/generated.rs @@ -1394,13 +1394,13 @@ impl fmt::Debug for PerfSettingsSubDomainEXT { #[derive(Copy, Clone, Eq, PartialEq)] pub struct PerfSettingsLevelEXT(i32); impl PerfSettingsLevelEXT { - #[doc = "Performance settings hint used by the application to indicate that it enters a non-XR\r\n section (head-locked / static screen), during which power savings are to be prioritized"] + #[doc = "Performance settings hint used by the application to indicate that it enters a non-XR\n section (head-locked / static screen), during which power savings are to be prioritized"] pub const POWER_SAVINGS: PerfSettingsLevelEXT = Self(0i32); - #[doc = "Performance settings hint used by the application to indicate that it enters a low\r\n and stable complexity section, during which reducing power is more important than\r\n occasional late rendering frames"] + #[doc = "Performance settings hint used by the application to indicate that it enters a low\n and stable complexity section, during which reducing power is more important than\n occasional late rendering frames"] pub const SUSTAINED_LOW: PerfSettingsLevelEXT = Self(25i32); - #[doc = "Performance settings hint used by the application to indicate that it enters\r\n a high or dynamic complexity section, during which the XR Runtime strives for consistent\r\n XR compositing and frame rendering within a thermally sustainable range"] + #[doc = "Performance settings hint used by the application to indicate that it enters\n a high or dynamic complexity section, during which the XR Runtime strives for consistent\n XR compositing and frame rendering within a thermally sustainable range"] pub const SUSTAINED_HIGH: PerfSettingsLevelEXT = Self(50i32); - #[doc = "Performance settings hint used by the application to indicate that the application enters\r\n a section with very high complexity, during which the XR Runtime is allowed to step\r\n up beyond the thermally sustainable range"] + #[doc = "Performance settings hint used by the application to indicate that the application enters\n a section with very high complexity, during which the XR Runtime is allowed to step\n up beyond the thermally sustainable range"] pub const BOOST: PerfSettingsLevelEXT = Self(75i32); pub fn from_raw(x: i32) -> Self { Self(x) @@ -1426,11 +1426,11 @@ impl fmt::Debug for PerfSettingsLevelEXT { #[derive(Copy, Clone, Eq, PartialEq)] pub struct PerfSettingsNotificationLevelEXT(i32); impl PerfSettingsNotificationLevelEXT { - #[doc = "Notifies that the sub-domain has reached a level\r\n where no further actions other than currently applied are necessary"] + #[doc = "Notifies that the sub-domain has reached a level\n where no further actions other than currently applied are necessary"] pub const NORMAL: PerfSettingsNotificationLevelEXT = Self(0i32); - #[doc = "Notifies that the sub-domain has reached an early warning level\r\n where the application should start proactive mitigation actions\r\n with the goal to return to the XR_PERF_NOTIF_LEVEL_NORMAL level"] + #[doc = "Notifies that the sub-domain has reached an early warning level\n where the application should start proactive mitigation actions\n with the goal to return to the XR_PERF_NOTIF_LEVEL_NORMAL level"] pub const WARNING: PerfSettingsNotificationLevelEXT = Self(25i32); - #[doc = "Notifies that the sub-domain has reached a critical\r\n level with significant performance degradation.\r\n The application should take drastic mitigation action"] + #[doc = "Notifies that the sub-domain has reached a critical\n level with significant performance degradation.\n The application should take drastic mitigation action"] pub const IMPAIRED: PerfSettingsNotificationLevelEXT = Self(75i32); pub fn from_raw(x: i32) -> Self { Self(x) From dcd36d74de59db9e5dab4e00da5c2f2fe2888a6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacopo=20Lib=C3=A8?= Date: Sun, 28 May 2023 11:59:53 +0200 Subject: [PATCH 8/9] Fix next function --- generator/src/main.rs | 7 +--- openxr/src/generated.rs | 85 +++++++++++++++++------------------------ sys/src/generated.rs | 14 +++---- sys/src/lib.rs | 15 -------- 4 files changed, 43 insertions(+), 78 deletions(-) diff --git a/generator/src/main.rs b/generator/src/main.rs index ec7d0054..a355ff7c 100644 --- a/generator/src/main.rs +++ b/generator/src/main.rs @@ -1887,8 +1887,6 @@ impl Parser { } else { quote!() }; - // Adds a `push_next` method to the builder if the struct is a root struct - // based on Ash let next_fn = if is_root_struct { generate_next_fn(&extends_name, NextFnType::Fn) } else { @@ -2381,9 +2379,8 @@ fn generate_next_fn(extension_trait_ident: &Ident, fn_type: NextFnType) -> Token { unsafe { let other: &mut sys::BaseOutStructure = mem::transmute(next); - let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); - let last_next = sys::ptr_chain_iter(other).last().unwrap(); - (*last_next).next = self.inner.next as _; + let next_ptr = <*mut sys::BaseOutStructure>::cast(other); + other.next = self.inner.next as _; self.inner.next = next_ptr; } self diff --git a/openxr/src/generated.rs b/openxr/src/generated.rs index aec1578b..79ddb029 100644 --- a/openxr/src/generated.rs +++ b/openxr/src/generated.rs @@ -4511,9 +4511,8 @@ pub(crate) mod builder { ) -> Self { unsafe { let other: &mut sys::BaseOutStructure = mem::transmute(next); - let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); - let last_next = sys::ptr_chain_iter(other).last().unwrap(); - (*last_next).next = self.inner.next as _; + let next_ptr = <*mut sys::BaseOutStructure>::cast(other); + other.next = self.inner.next as _; self.inner.next = next_ptr; } self @@ -4942,9 +4941,8 @@ pub(crate) mod builder { fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let other: &mut sys::BaseOutStructure = mem::transmute(next); - let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); - let last_next = sys::ptr_chain_iter(other).last().unwrap(); - (*last_next).next = self.inner.next as _; + let next_ptr = <*mut sys::BaseOutStructure>::cast(other); + other.next = self.inner.next as _; self.inner.next = next_ptr; } self @@ -5036,9 +5034,8 @@ pub(crate) mod builder { fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let other: &mut sys::BaseOutStructure = mem::transmute(next); - let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); - let last_next = sys::ptr_chain_iter(other).last().unwrap(); - (*last_next).next = self.inner.next as _; + let next_ptr = <*mut sys::BaseOutStructure>::cast(other); + other.next = self.inner.next as _; self.inner.next = next_ptr; } self @@ -5140,9 +5137,8 @@ pub(crate) mod builder { fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let other: &mut sys::BaseOutStructure = mem::transmute(next); - let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); - let last_next = sys::ptr_chain_iter(other).last().unwrap(); - (*last_next).next = self.inner.next as _; + let next_ptr = <*mut sys::BaseOutStructure>::cast(other); + other.next = self.inner.next as _; self.inner.next = next_ptr; } self @@ -5234,9 +5230,8 @@ pub(crate) mod builder { fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let other: &mut sys::BaseOutStructure = mem::transmute(next); - let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); - let last_next = sys::ptr_chain_iter(other).last().unwrap(); - (*last_next).next = self.inner.next as _; + let next_ptr = <*mut sys::BaseOutStructure>::cast(other); + other.next = self.inner.next as _; self.inner.next = next_ptr; } self @@ -5338,9 +5333,8 @@ pub(crate) mod builder { fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let other: &mut sys::BaseOutStructure = mem::transmute(next); - let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); - let last_next = sys::ptr_chain_iter(other).last().unwrap(); - (*last_next).next = self.inner.next as _; + let next_ptr = <*mut sys::BaseOutStructure>::cast(other); + other.next = self.inner.next as _; self.inner.next = next_ptr; } self @@ -5447,9 +5441,8 @@ pub(crate) mod builder { fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let other: &mut sys::BaseOutStructure = mem::transmute(next); - let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); - let last_next = sys::ptr_chain_iter(other).last().unwrap(); - (*last_next).next = self.inner.next as _; + let next_ptr = <*mut sys::BaseOutStructure>::cast(other); + other.next = self.inner.next as _; self.inner.next = next_ptr; } self @@ -5536,9 +5529,8 @@ pub(crate) mod builder { fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let other: &mut sys::BaseOutStructure = mem::transmute(next); - let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); - let last_next = sys::ptr_chain_iter(other).last().unwrap(); - (*last_next).next = self.inner.next as _; + let next_ptr = <*mut sys::BaseOutStructure>::cast(other); + other.next = self.inner.next as _; self.inner.next = next_ptr; } self @@ -5655,9 +5647,8 @@ pub(crate) mod builder { fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let other: &mut sys::BaseOutStructure = mem::transmute(next); - let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); - let last_next = sys::ptr_chain_iter(other).last().unwrap(); - (*last_next).next = self.inner.next as _; + let next_ptr = <*mut sys::BaseOutStructure>::cast(other); + other.next = self.inner.next as _; self.inner.next = next_ptr; } self @@ -5749,9 +5740,8 @@ pub(crate) mod builder { fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let other: &mut sys::BaseOutStructure = mem::transmute(next); - let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); - let last_next = sys::ptr_chain_iter(other).last().unwrap(); - (*last_next).next = self.inner.next as _; + let next_ptr = <*mut sys::BaseOutStructure>::cast(other); + other.next = self.inner.next as _; self.inner.next = next_ptr; } self @@ -5838,9 +5828,8 @@ pub(crate) mod builder { fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let other: &mut sys::BaseOutStructure = mem::transmute(next); - let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); - let last_next = sys::ptr_chain_iter(other).last().unwrap(); - (*last_next).next = self.inner.next as _; + let next_ptr = <*mut sys::BaseOutStructure>::cast(other); + other.next = self.inner.next as _; self.inner.next = next_ptr; } self @@ -5952,9 +5941,8 @@ pub(crate) mod builder { fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let other: &mut sys::BaseOutStructure = mem::transmute(next); - let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); - let last_next = sys::ptr_chain_iter(other).last().unwrap(); - (*last_next).next = self.inner.next as _; + let next_ptr = <*mut sys::BaseOutStructure>::cast(other); + other.next = self.inner.next as _; self.inner.next = next_ptr; } self @@ -6071,9 +6059,8 @@ pub(crate) mod builder { fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let other: &mut sys::BaseOutStructure = mem::transmute(next); - let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); - let last_next = sys::ptr_chain_iter(other).last().unwrap(); - (*last_next).next = self.inner.next as _; + let next_ptr = <*mut sys::BaseOutStructure>::cast(other); + other.next = self.inner.next as _; self.inner.next = next_ptr; } self @@ -6145,9 +6132,8 @@ pub(crate) mod builder { fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let other: &mut sys::BaseOutStructure = mem::transmute(next); - let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); - let last_next = sys::ptr_chain_iter(other).last().unwrap(); - (*last_next).next = self.inner.next as _; + let next_ptr = <*mut sys::BaseOutStructure>::cast(other); + other.next = self.inner.next as _; self.inner.next = next_ptr; } self @@ -6244,9 +6230,8 @@ pub(crate) mod builder { fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let other: &mut sys::BaseOutStructure = mem::transmute(next); - let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); - let last_next = sys::ptr_chain_iter(other).last().unwrap(); - (*last_next).next = self.inner.next as _; + let next_ptr = <*mut sys::BaseOutStructure>::cast(other); + other.next = self.inner.next as _; self.inner.next = next_ptr; } self @@ -6324,9 +6309,8 @@ pub(crate) mod builder { fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let other: &mut sys::BaseOutStructure = mem::transmute(next); - let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); - let last_next = sys::ptr_chain_iter(other).last().unwrap(); - (*last_next).next = self.inner.next as _; + let next_ptr = <*mut sys::BaseOutStructure>::cast(other); + other.next = self.inner.next as _; self.inner.next = next_ptr; } self @@ -6393,9 +6377,8 @@ pub(crate) mod builder { fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let other: &mut sys::BaseOutStructure = mem::transmute(next); - let next_ptr = <*mut sys::BaseOutStructure>::cast(other.next); - let last_next = sys::ptr_chain_iter(other).last().unwrap(); - (*last_next).next = self.inner.next as _; + let next_ptr = <*mut sys::BaseOutStructure>::cast(other); + other.next = self.inner.next as _; self.inner.next = next_ptr; } self diff --git a/sys/src/generated.rs b/sys/src/generated.rs index bbbf49bb..91768080 100644 --- a/sys/src/generated.rs +++ b/sys/src/generated.rs @@ -1394,13 +1394,13 @@ impl fmt::Debug for PerfSettingsSubDomainEXT { #[derive(Copy, Clone, Eq, PartialEq)] pub struct PerfSettingsLevelEXT(i32); impl PerfSettingsLevelEXT { - #[doc = "Performance settings hint used by the application to indicate that it enters a non-XR\n section (head-locked / static screen), during which power savings are to be prioritized"] + #[doc = "Performance settings hint used by the application to indicate that it enters a non-XR\r\n section (head-locked / static screen), during which power savings are to be prioritized"] pub const POWER_SAVINGS: PerfSettingsLevelEXT = Self(0i32); - #[doc = "Performance settings hint used by the application to indicate that it enters a low\n and stable complexity section, during which reducing power is more important than\n occasional late rendering frames"] + #[doc = "Performance settings hint used by the application to indicate that it enters a low\r\n and stable complexity section, during which reducing power is more important than\r\n occasional late rendering frames"] pub const SUSTAINED_LOW: PerfSettingsLevelEXT = Self(25i32); - #[doc = "Performance settings hint used by the application to indicate that it enters\n a high or dynamic complexity section, during which the XR Runtime strives for consistent\n XR compositing and frame rendering within a thermally sustainable range"] + #[doc = "Performance settings hint used by the application to indicate that it enters\r\n a high or dynamic complexity section, during which the XR Runtime strives for consistent\r\n XR compositing and frame rendering within a thermally sustainable range"] pub const SUSTAINED_HIGH: PerfSettingsLevelEXT = Self(50i32); - #[doc = "Performance settings hint used by the application to indicate that the application enters\n a section with very high complexity, during which the XR Runtime is allowed to step\n up beyond the thermally sustainable range"] + #[doc = "Performance settings hint used by the application to indicate that the application enters\r\n a section with very high complexity, during which the XR Runtime is allowed to step\r\n up beyond the thermally sustainable range"] pub const BOOST: PerfSettingsLevelEXT = Self(75i32); pub fn from_raw(x: i32) -> Self { Self(x) @@ -1426,11 +1426,11 @@ impl fmt::Debug for PerfSettingsLevelEXT { #[derive(Copy, Clone, Eq, PartialEq)] pub struct PerfSettingsNotificationLevelEXT(i32); impl PerfSettingsNotificationLevelEXT { - #[doc = "Notifies that the sub-domain has reached a level\n where no further actions other than currently applied are necessary"] + #[doc = "Notifies that the sub-domain has reached a level\r\n where no further actions other than currently applied are necessary"] pub const NORMAL: PerfSettingsNotificationLevelEXT = Self(0i32); - #[doc = "Notifies that the sub-domain has reached an early warning level\n where the application should start proactive mitigation actions\n with the goal to return to the XR_PERF_NOTIF_LEVEL_NORMAL level"] + #[doc = "Notifies that the sub-domain has reached an early warning level\r\n where the application should start proactive mitigation actions\r\n with the goal to return to the XR_PERF_NOTIF_LEVEL_NORMAL level"] pub const WARNING: PerfSettingsNotificationLevelEXT = Self(25i32); - #[doc = "Notifies that the sub-domain has reached a critical\n level with significant performance degradation.\n The application should take drastic mitigation action"] + #[doc = "Notifies that the sub-domain has reached a critical\r\n level with significant performance degradation.\r\n The application should take drastic mitigation action"] pub const IMPAIRED: PerfSettingsNotificationLevelEXT = Self(75i32); pub fn from_raw(x: i32) -> Self { Self(x) diff --git a/sys/src/lib.rs b/sys/src/lib.rs index be220b19..0c8bf193 100644 --- a/sys/src/lib.rs +++ b/sys/src/lib.rs @@ -220,18 +220,3 @@ impl std::ops::IndexMut for [T] { &mut self[joint.into_raw() as usize] } } - -/// Iterates through the pointer chain. Includes the item that is passed into the function. -/// Stops at the last [`BaseOutStructure`] that has a null [`BaseOutStructure::next`] field. -pub unsafe fn ptr_chain_iter(ptr: &mut T) -> impl Iterator { - let ptr = <*mut T>::cast::(ptr); - (0..).scan(ptr, |p_ptr, _| { - if p_ptr.is_null() { - return None; - } - let n_ptr = (**p_ptr).next; - let old = *p_ptr; - *p_ptr = n_ptr; - Some(old) - }) -} From 3818adb6b71ffddd84bf397eaab5b90034de6ea6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacopo=20Lib=C3=A8?= Date: Sun, 4 Jun 2023 11:43:18 +0200 Subject: [PATCH 9/9] Remove unecessary checks and changes --- generator/src/main.rs | 17 ++++++++--------- sys/src/generated.rs | 14 +++++++------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/generator/src/main.rs b/generator/src/main.rs index a355ff7c..6ba9dd80 100644 --- a/generator/src/main.rs +++ b/generator/src/main.rs @@ -1392,7 +1392,7 @@ impl Parser { { return None; } - if self.is_root_struct(name, s) { + if self.is_root_struct(name) { Some(&name[..]) } else { None @@ -2045,14 +2045,13 @@ impl Parser { } /// Determine whether a struct is a root struct to be reexported with a push next function - fn is_root_struct(&self, s_name: &str, s: &Struct) -> bool { - s.extends.is_none() - && self.structs.iter().any(|(_, v)| { - v.extends - .as_ref() - .map(|parent_name| parent_name.as_ref() == s_name) - .unwrap_or(false) - }) + fn is_root_struct(&self, s_name: &str) -> bool { + self.structs.iter().any(|(_, v)| { + v.extends + .as_ref() + .map(|parent_name| parent_name.as_ref() == s_name) + .unwrap_or(false) + }) } } diff --git a/sys/src/generated.rs b/sys/src/generated.rs index 91768080..bbbf49bb 100644 --- a/sys/src/generated.rs +++ b/sys/src/generated.rs @@ -1394,13 +1394,13 @@ impl fmt::Debug for PerfSettingsSubDomainEXT { #[derive(Copy, Clone, Eq, PartialEq)] pub struct PerfSettingsLevelEXT(i32); impl PerfSettingsLevelEXT { - #[doc = "Performance settings hint used by the application to indicate that it enters a non-XR\r\n section (head-locked / static screen), during which power savings are to be prioritized"] + #[doc = "Performance settings hint used by the application to indicate that it enters a non-XR\n section (head-locked / static screen), during which power savings are to be prioritized"] pub const POWER_SAVINGS: PerfSettingsLevelEXT = Self(0i32); - #[doc = "Performance settings hint used by the application to indicate that it enters a low\r\n and stable complexity section, during which reducing power is more important than\r\n occasional late rendering frames"] + #[doc = "Performance settings hint used by the application to indicate that it enters a low\n and stable complexity section, during which reducing power is more important than\n occasional late rendering frames"] pub const SUSTAINED_LOW: PerfSettingsLevelEXT = Self(25i32); - #[doc = "Performance settings hint used by the application to indicate that it enters\r\n a high or dynamic complexity section, during which the XR Runtime strives for consistent\r\n XR compositing and frame rendering within a thermally sustainable range"] + #[doc = "Performance settings hint used by the application to indicate that it enters\n a high or dynamic complexity section, during which the XR Runtime strives for consistent\n XR compositing and frame rendering within a thermally sustainable range"] pub const SUSTAINED_HIGH: PerfSettingsLevelEXT = Self(50i32); - #[doc = "Performance settings hint used by the application to indicate that the application enters\r\n a section with very high complexity, during which the XR Runtime is allowed to step\r\n up beyond the thermally sustainable range"] + #[doc = "Performance settings hint used by the application to indicate that the application enters\n a section with very high complexity, during which the XR Runtime is allowed to step\n up beyond the thermally sustainable range"] pub const BOOST: PerfSettingsLevelEXT = Self(75i32); pub fn from_raw(x: i32) -> Self { Self(x) @@ -1426,11 +1426,11 @@ impl fmt::Debug for PerfSettingsLevelEXT { #[derive(Copy, Clone, Eq, PartialEq)] pub struct PerfSettingsNotificationLevelEXT(i32); impl PerfSettingsNotificationLevelEXT { - #[doc = "Notifies that the sub-domain has reached a level\r\n where no further actions other than currently applied are necessary"] + #[doc = "Notifies that the sub-domain has reached a level\n where no further actions other than currently applied are necessary"] pub const NORMAL: PerfSettingsNotificationLevelEXT = Self(0i32); - #[doc = "Notifies that the sub-domain has reached an early warning level\r\n where the application should start proactive mitigation actions\r\n with the goal to return to the XR_PERF_NOTIF_LEVEL_NORMAL level"] + #[doc = "Notifies that the sub-domain has reached an early warning level\n where the application should start proactive mitigation actions\n with the goal to return to the XR_PERF_NOTIF_LEVEL_NORMAL level"] pub const WARNING: PerfSettingsNotificationLevelEXT = Self(25i32); - #[doc = "Notifies that the sub-domain has reached a critical\r\n level with significant performance degradation.\r\n The application should take drastic mitigation action"] + #[doc = "Notifies that the sub-domain has reached a critical\n level with significant performance degradation.\n The application should take drastic mitigation action"] pub const IMPAIRED: PerfSettingsNotificationLevelEXT = Self(75i32); pub fn from_raw(x: i32) -> Self { Self(x)