pub fn shader_auto_load<'a, 'b>(path: &'b str) -> Result<ShaderSource<'a>, GpuError> {
        if let Ok(spirv) = Self::make_spirv_owned(std::fs::read(path).unwrap()) {
            Ok(spirv)
        } else if let Ok(wgsl) = Self::make_wgsl_owned(std::fs::read_to_string(path).unwrap()) {
            Ok(wgsl)
        } else {
            Err(GpuError::ShaderParseError)
        }
    }
/// 'a: lifetime of the shader source
/// 'b: lifetime of the input path
'a: lifetime of the shader source
'b: lifetime of the input path
' a : lifetime of the shader source ' b : lifetime of the input path
pub fn shader_auto_load<'a, 'b>(path: &'b str) -> Result<ShaderSource<'a>, GpuError> {
        if let Ok(spirv) = Self::make_spirv_owned(std::fs::read(path).unwrap()) {
            Ok(spirv)
        } else if let Ok(wgsl) = Self::make_wgsl_owned(std::fs::read_to_string(path).unwrap()) {
            Ok(wgsl)
        } else {
            Err(GpuError::ShaderParseError)
        }
    }
pub fn shader_auto_load < ' a , ' b > ( path : & ' b str ) -> Result < ShaderSource < ' a > , GpuError > { if let Ok ( spirv ) = Self :: make_spirv_owned ( std :: fs :: read ( path ) . unwrap ( ) ) { Ok ( spirv ) } else if let Ok ( wgsl ) = Self :: make_wgsl_owned ( std :: fs :: read_to_string ( path ) . unwrap ( ) ) { Ok ( wgsl ) } else { Err ( GpuError :: ShaderParseError ) } }
'a: lifetime of the shader source
'b: lifetime of the input path
' a : lifetime of the shader source ' b : lifetime of the input path
path
&'b str
path
&'b str