use std::error::Error as StdError; use std::fmt::{self, Display}; #[derive(Debug, Clone, Copy)] pub enum Error { GuildIdNotFound, } impl Error { pub fn boxed(self) -> Box { Box::new(self) } } impl Display for Error { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { // write!(f, "") match self { Self::GuildIdNotFound => write!(f, "Guild ID not found!"), } } } impl StdError for Error {}