You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
463 B

#[derive(Debug)]
pub enum ChatError {
IOError(std::io::Error),
MutexPoisonError(),
Protocol(String),
}
impl From<std::io::Error> for ChatError {
fn from(error: std::io::Error) -> Self {
ChatError::IOError(error)
}
}
impl<'a, T> From<std::sync::PoisonError<std::sync::MutexGuard<'a, T>>> for ChatError {
fn from(_error: std::sync::PoisonError<std::sync::MutexGuard<'a, T>>) -> Self {
ChatError::MutexPoisonError()
}
}