/// Checks if all the validation layers specified are supported supported in
/// this machine.
Checks if all the validation layers specified are supported supported in
this machine.
Checks if all the validation layers specified are supported supported in this machine .
unsafe fn check_validation_layer_support(entry: &Entry) -> bool {
    let available_layers: Vec<_> = entry
      .enumerate_instance_layer_properties()
      .expect("Unable to enumerate layers")
      .iter()
      .map(|layer| CStr::from_ptr(layer.layer_name.as_ptr()).to_owned())
      .collect();
    info!(
      "Supported Layers:\n\t{:?}\nRequested Layers:\n\t{:?}",
      available_layers,
      VALIDATION_LAYERS
        .iter()
        .map(|vl| vl.to_str().unwrap())
        .collect::<Vec<_>>()
    );
    VALIDATION_LAYERS
      .iter()
      .map(|requested_layer| available_layers.contains(&requested_layer))
      .all(|b| b)
  }
unsafe fn check_validation_layer_support ( entry : & Entry ) -> bool { let available_layers : Vec < _ > = entry . enumerate_instance_layer_properties ( ) . expect ( " " ) . iter ( ) . map ( | layer | CStr :: from_ptr ( layer . layer_name . as_ptr ( ) ) . to_owned ( ) ) . collect ( ) ; info ! ( " \n \t \n \n \t " available_layers VALIDATION_LAYERS iter ( ) map ( vl vl to_str ( ) unwrap ( ) ) collect Vec ( ) ) ; VALIDATION_LAYERS . iter ( ) . map ( | requested_layer | available_layers . contains ( & requested_layer ) ) . all ( | b | b ) }
Checks if all the validation layers specified are supported supported in
this machine.
Checks if all the validation layers specified are supported supported in this machine .
entry
&Entry