easygpu/
error.rs

1use std::io;
2
3#[derive(Debug, Clone, thiserror::Error)]
4pub enum Error {
5    #[error("a suitable graphics adapter was not found")]
6    NoAdaptersFound,
7    #[error("device creation error")]
8    RequestDeviceError(#[from] wgpu::RequestDeviceError),
9}
10
11impl From<Error> for io::Error {
12    fn from(err: Error) -> io::Error {
13        io::Error::new(io::ErrorKind::Other, err)
14    }
15}