ipfs_bitswap/error.rs
1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum BitswapError {
5 #[error("Error while reading from socket: {0}")]
6 ReadError(#[from] libp2p_core::upgrade::ReadOneError),
7 #[error("Error while decoding bitswap message: {0}")]
8 ProtobufError(#[from] prost::DecodeError),
9 #[error("Error while parsing cid: {0}")]
10 Cid(#[from] cid::Error),
11}