fn missing_extensions(
    entry: &Entry,
    required_extensions: &Vec<String>,
) -> Result<Vec<String>> {
    let available_extensions =
        entry.enumerate_instance_extension_properties()?;

    let available_names: Vec<String> = available_extensions
        .iter()
        .map(|ext| {
            String::from_utf8(
                ext.extension_name.iter().map(|c| *c as u8).collect(),
            )
        })
        // only accept valid utf-8 extension names
        .filter(|item| item.is_ok())
        .map(|item| item.unwrap())
        .collect();

    log::info!("Available extensions {}", available_names.join("\n"));

    Ok(required_extensions
        .iter()
        .cloned()
        .filter(|name| available_names.contains(name))
        .collect())
}
/// Get a list of all extensions which are required but not available for this
/// vulkan instance.
Get a list of all extensions which are required but not available for this
vulkan instance.
Get a list of all extensions which are required but not available for this vulkan instance .
fn missing_extensions(
    entry: &Entry,
    required_extensions: &Vec<String>,
) -> Result<Vec<String>> {
    let available_extensions =
        entry.enumerate_instance_extension_properties()?;
    let available_names: Vec<String> = available_extensions
        .iter()
        .map(|ext| {
            String::from_utf8(
                ext.extension_name.iter().map(|c| *c as u8).collect(),
            )
        })
        // only accept valid utf-8 extension names
        .filter(|item| item.is_ok())
        .map(|item| item.unwrap())
        .collect();
    log::info!("Available extensions {}", available_names.join("\n"));
    Ok(required_extensions
        .iter()
        .cloned()
        .filter(|name| available_names.contains(name))
        .collect())
}
fn missing_extensions ( entry : & Entry , required_extensions : & Vec < String > , ) -> Result < Vec < String > > { let available_extensions = entry . enumerate_instance_extension_properties ( ) ? ; let available_names : Vec < String > = available_extensions . iter ( ) . map ( | ext | { String :: from_utf8 ( ext . extension_name . iter ( ) . map ( | c | * c as u8 ) . collect ( ) , ) } ) // only accept valid utf-8 extension names . filter ( | item | item . is_ok ( ) ) . map ( | item | item . unwrap ( ) ) . collect ( ) ; log :: info ! ( " " available_names join ( " \n " ) ) ; Ok ( required_extensions . iter ( ) . cloned ( ) . filter ( | name | available_names . contains ( name ) ) . collect ( ) ) }
Get a list of all extensions which are required but not available for this
vulkan instance.
Get a list of all extensions which are required but not available for this vulkan instance .
entry
&Entry
required_extensions
&Vec<String>