intuitive/error.rs
1//! The crate's `Error` type.
2
3use std::{io, sync::mpsc::RecvError};
4
5use thiserror::Error;
6
7pub type Result<T> = std::result::Result<T, Error>;
8
9#[derive(Error, Debug)]
10pub enum Error {
11 #[error("io: {0}")]
12 Io(#[from] io::Error),
13
14 #[error("recv: {0}")]
15 Recv(#[from] RecvError),
16
17 #[error("send: {0}")]
18 Send(String),
19
20 #[error("manager: {0}")]
21 Manager(&'static str),
22
23 #[error("use_state calls must be in the same order: {0}")]
24 UseState(String),
25}