[][src]Function vulkano::instance::layers_list

pub fn layers_list() -> Result<LayersIterator, LayersListError>

Queries the list of layers that are available when creating an instance.

On success, this function returns an iterator that produces LayerProperties objects. In order to enable a layer, you need to pass its name (returned by LayerProperties::name()) when creating the Instance.

This function returns an error if it failed to load the Vulkan library.

Note: It is possible that one of the layers enumerated here is no longer available when you create the Instance. This will lead to an error when calling Instance::new. The author isn't aware of any situation where this would happen, but it is theoretically possible according to the specifications.

Example

use vulkano::instance;

for layer in instance::layers_list().unwrap() {
    println!("Available layer: {}", layer.name());
}