ferrum_wgpu/error.rs
1/// Failed to get surface frame. Simplificated mirror of `wgpu::CurrentSurfaceTexture`
2/// (because in v29 its not `Result`)
3#[derive(Debug, Clone, Copy, PartialEq, Eq)]
4pub enum SurfaceError {
5 /// The surface has changed
6 Outdated,
7 /// The suface has lossed
8 Lost,
9 /// Error validatios of intenal wgpu
10 Validation,
11}
12
13impl std::fmt::Display for SurfaceError {
14 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15 match self {
16 SurfaceError::Outdated => write!(f, "surface outdated"),
17 SurfaceError::Lost => write!(f, "surface lost"),
18 SurfaceError::Validation => write!(f, "surface validation error"),
19 }
20 }
21}