Struct LayerManifest

Source
#[non_exhaustive]
pub struct LayerManifest { pub name: &'static str, pub spec_version: u32, pub implementation_version: u32, pub description: &'static str, pub device_extensions: &'static [ExtensionProperties], }
Expand description

A Rust bindings of the layer manifest file.

The return type of Layer::manifest. This type is marked as non_exhaustive, because it will evolve with the layer manifest schema. The user should initialize the value of this type in a way that will still compile if new fields are added. LayerManifest::default will initialize all fields to empty.

let mut manifest = LayerManifest::default();
manifest.name = "VK_LAYER_VENDOR_rust_example";
manifest.spec_version = vk::API_VERSION_1_1;

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§name: &'static str

The string used to uniquely identify this layer to applications.

The layer name should follow the layer name convention according to LLP_LAYER_3.

§spec_version: u32

The VkLayerProperties::specVersion field. The "api_version" JSON node.

The major.minor.patch version number of the Vulkan API that the layer supports encoded as described in https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#extendingvulkan-coreversions-versionnumbers. It does not require the application to make use of that API version. It simply is an indication that the layer can support Vulkan API instance and device functions up to and including that API version.

§implementation_version: u32

The version of the layer implemented.

It is an integer, increasing with backward compatible changes. If the layer itself has any major changes, this number should change so the loader and/or application can identify it properly.

§description: &'static str

A high-level description of the layer and its intended use which provides additional details that can be used by the application to identify the layer.

The description shouldn’t be longer than VK_MAX_DESCRIPTION_SIZE bytes after encoded as a null-terminated UTF-8 string. Otherwise, the layer framework will panic at runtime.

§device_extensions: &'static [ExtensionProperties]

Contains the list of device extension names supported by this layer.

An array of one or more elements is required if any device extensions are supported by a layer; otherwise the array should be empty. In vkCreateDevice, the layer framework removes the extensions mentioned here from the VkDeviceCreateInfo::ppEnabledExtensionNames list.

Trait Implementations§

Source§

impl Clone for LayerManifest

Source§

fn clone(&self) -> LayerManifest

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for LayerManifest

Source§

fn default() -> LayerManifest

Returns the “default value” for a type. Read more
Source§

impl LayerManifestExt for LayerManifest

Available on crate feature _test only.
Source§

fn test_default() -> Self

Create a LayerManifest with reasonable fields.

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Any for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

§

fn type_name(&self) -> &'static str

§

impl<T> AnySync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.