1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use thiserror::Error;
#[derive(Debug, Error)]
pub enum BitswapError {
#[error("Error while reading from socket: {0}")]
ReadError(#[from] std::io::Error),
#[error("Error while decoding bitswap message: {0}")]
ProtobufError(#[from] prost::DecodeError),
#[error("Error while parsing cid: {0}")]
Cid(#[from] libipld::cid::Error),
#[error("Error while handling IPLD: {0}")]
Ipld(#[from] libipld::error::Error),
#[error("Error while handling Multihash: {0}")]
Multihash(#[from] libipld::multihash::Error),
}