start with write

This commit is contained in:
nora 2022-02-12 22:31:58 +01:00
parent 83778ac2c9
commit cb3710cd3f
6 changed files with 1337 additions and 699 deletions

View file

@ -1,3 +1,5 @@
use std::io::Error;
#[derive(Debug, thiserror::Error)]
pub enum TransError {
#[error("{0}")]
@ -6,6 +8,12 @@ pub enum TransError {
Other(#[from] anyhow::Error),
}
impl From<std::io::Error> for TransError {
fn from(err: Error) -> Self {
Self::Other(err.into())
}
}
#[derive(Debug, thiserror::Error)]
pub enum ProtocolError {
#[error("fatal error")]