summaryrefslogtreecommitdiff
path: root/src/transport/error.rs
blob: 41f9cf2c0e91a8c98269ffa01b88fda0251cf7ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use thiserror::Error;

#[derive(Debug, Error)]
pub enum TransportError {
    #[error("io error: {0}")]
    Io(#[from] std::io::Error),

    #[error("codec error: {0}")]
    Codec(#[from] crate::codec::error::CodecError),

    #[error("receiver channel closed")]
    ChannelClosed,

    #[error("receiver lock poisoned")]
    LockPoisoned,

    #[error("{0}")]
    Other(String),
}