1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
use std::io::Error as IoError; use thiserror::Error; /// Possible errors from Auth #[derive(Error, Debug)] pub enum AuthError { #[error("IoError")] IoError(#[from] IoError), } impl From<AuthError> for IoError { fn from(e: AuthError) -> Self { match e { AuthError::IoError(source) => source, } } }