blob: 241c16e7afef114731735022240e8b9e0c74e492 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
use std::io;
use thiserror::Error;
#[derive(Error, Debug, Clone)]
pub enum ConnectionError {
#[error("I/O error: {0}")]
Io(String),
}
impl From<io::Error> for ConnectionError {
fn from(error: io::Error) -> Self {
ConnectionError::Io(error.to_string())
}
}
|