//! Various errors that can occur use std::{ error::Error, fmt::{self, Display, Formatter}, }; /// Error loading an asset #[derive(Clone, Debug)] pub struct LoadError(String); impl<'s> From<&'s str> for LoadError { fn from(s: &'s str) -> Self { Self(s.into()) } } impl Display for LoadError { fn fmt(&self, f: &mut Formatter) -> fmt::Result { write!(f, "{}", self.0) } } impl Error for LoadError {}