refactor(proto): replace anyhow with thiserror in writers
This commit is contained in:
parent
bb39d138d8
commit
58c69928a1
5 changed files with 21 additions and 6 deletions
11
proto/src/writer/errors.rs
Normal file
11
proto/src/writer/errors.rs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
use thiserror::Error;
|
||||
use tokio::io;
|
||||
use crate::message::errors::ProtoSerializeError;
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum ProtoWriteError {
|
||||
#[error("writing to socket failed")]
|
||||
Io(#[from] io::Error),
|
||||
#[error("serialization of inner data failed")]
|
||||
Serialize(#[from] ProtoSerializeError),
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue