tcp_channel_server/
error.rs

1use crate::State;
2use thiserror::Error;
3
4#[derive(Error, Debug)]
5pub enum Error {
6    #[error(transparent)]
7    IOError(#[from] std::io::Error),
8    #[error(transparent)]
9    JoinError(#[from] tokio::task::JoinError),
10    #[error(transparent)]
11    SendError(#[from] async_channel::SendError<State>),
12    #[error("not listener or repeat start")]
13    NotListenerError,
14}
15
16pub type Result<T, E = Error> = core::result::Result<T, E>;