falcorn_sdk/error.rs
1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum Error {
5 #[error("io error: {0}")]
6 Io(#[from] std::io::Error),
7 #[error("serialize error: {0}")]
8 Serialize(#[from] Box<bincode::ErrorKind>),
9 #[error("protocol error: {0}")]
10 Protocol(String),
11 #[error("remote error: {code} - {message}")]
12 Remote { code: String, message: String },
13}
14
15pub type Result<T> = std::result::Result<T, Error>;