pub struct InstanceCreateInfo<'a> {
pub s_type: StructureType,
pub p_next: *const c_void,
pub flags: InstanceCreateFlags,
pub p_application_info: *const ApplicationInfo<'a>,
pub enabled_layer_count: u32,
pub pp_enabled_layer_names: *const *const c_char,
pub enabled_extension_count: u32,
pub pp_enabled_extension_names: *const *const c_char,
/* private fields */
}Expand description
Native structure VkInstanceCreateInfo.
Fields§
§s_type: StructureTypeNative field sType.
p_next: *const c_voidNative field pNext.
flags: InstanceCreateFlagsNative field flags.
p_application_info: *const ApplicationInfo<'a>Native field pApplicationInfo.
enabled_layer_count: u32Native field enabledLayerCount.
pp_enabled_layer_names: *const *const c_charNative field ppEnabledLayerNames.
enabled_extension_count: u32Native field enabledExtensionCount.
pp_enabled_extension_names: *const *const c_charNative field ppEnabledExtensionNames.
Implementations§
Source§impl<'a> InstanceCreateInfo<'a>
impl<'a> InstanceCreateInfo<'a>
Sourcepub fn new() -> Self
pub fn new() -> Self
Construct the record with its canonical sType tag and default native state.
Sourcepub fn set_flags(self, value: InstanceCreateFlags) -> Self
pub fn set_flags(self, value: InstanceCreateFlags) -> Self
Set native field flags without native effects.
Sourcepub fn set_application_info(self, value: &'a ApplicationInfo<'a>) -> Self
pub fn set_application_info(self, value: &'a ApplicationInfo<'a>) -> Self
Set native field pApplicationInfo without native effects.
Sourcepub fn set_enabled_layer_count(self, value: u32) -> Self
pub fn set_enabled_layer_count(self, value: u32) -> Self
Set native count enabledLayerCount directly without checking associated pointer extents.
Use the borrowed array helpers to derive matching storage and counts together.
Direct count edits support null-query/dynamic-state paths and remain a
native-call validity obligation, including after earlier borrowed setters.
Sourcepub fn set_enabled_layer_names(
self,
value: &'a [*const c_char],
) -> Result<Self, ConstructionError>
pub fn set_enabled_layer_names( self, value: &'a [*const c_char], ) -> Result<Self, ConstructionError>
Borrow ppEnabledLayerNames and set checked native count enabledLayerCount.
The borrow covers this storage only; nested raw pointers, format, alignment
and asynchronous retention remain native-call obligations.
Output storage must be initialized; returned sizes do not enlarge its capacity.
§Errors
Returns a construction error if the length exceeds the native count width.
Sourcepub fn set_enabled_extension_count(self, value: u32) -> Self
pub fn set_enabled_extension_count(self, value: u32) -> Self
Set native count enabledExtensionCount directly without checking associated pointer extents.
Use the borrowed array helpers to derive matching storage and counts together.
Direct count edits support null-query/dynamic-state paths and remain a
native-call validity obligation, including after earlier borrowed setters.
Sourcepub fn set_enabled_extension_names(
self,
value: &'a [*const c_char],
) -> Result<Self, ConstructionError>
pub fn set_enabled_extension_names( self, value: &'a [*const c_char], ) -> Result<Self, ConstructionError>
Borrow ppEnabledExtensionNames and set checked native count enabledExtensionCount.
The borrow covers this storage only; nested raw pointers, format, alignment
and asynchronous retention remain native-call obligations.
Output storage must be initialized; returned sizes do not enlarge its capacity.
§Errors
Returns a construction error if the length exceeds the native count width.
Sourcepub fn push_next<T: Extends<Self>>(
self,
next: &'a mut T,
) -> Result<Self, ConstructionError>
pub fn push_next<T: Extends<Self>>( self, next: &'a mut T, ) -> Result<Self, ConstructionError>
Prepend one registry-compatible node, retaining its exclusive borrow.
The node must have a null p_next and both headers must have canonical tags.
Existing links are never traversed and remain written after the borrow ends.
Type compatibility does not establish enabled extensions or Vulkan valid usage.
§Errors
Returns a construction error for a changed structure tag or already-linked node.
Trait Implementations§
Source§impl<'a> Default for InstanceCreateInfo<'a>
impl<'a> Default for InstanceCreateInfo<'a>
impl<'a, 'root> Extends<InstanceCreateInfo<'root>> for DebugReportCallbackCreateInfoEXT<'a>
impl<'a, 'root> Extends<InstanceCreateInfo<'root>> for ValidationFlagsEXT<'a>
impl<'a, 'root> Extends<InstanceCreateInfo<'root>> for ValidationFeaturesEXT<'a>
impl<'a, 'root> Extends<InstanceCreateInfo<'root>> for LayerSettingsCreateInfoEXT<'a>
impl<'a, 'root> Extends<InstanceCreateInfo<'root>> for DebugUtilsMessengerCreateInfoEXT<'a>
impl<'a, 'root> Extends<InstanceCreateInfo<'root>> for ExportMetalObjectCreateInfoEXT<'a>
platform-metal only.