You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
multihook/src/utils/error.rs

26 lines
611 B
Rust

use std::string::FromUtf8Error;
use thiserror::Error;
pub type MultihookResult<T> = Result<T, MultihookError>;
#[derive(Error, Debug)]
pub enum MultihookError {
#[error("Failed to parse body as utf8 string {0}")]
UTF8Error(#[from] FromUtf8Error),
#[error(transparent)]
TomlSerializeError(#[from] toml::ser::Error),
#[error(transparent)]
TomlDeserializeError(#[from] toml::de::Error),
#[error(transparent)]
IoError(#[from] std::io::Error),
#[error(transparent)]
ConfigError(#[from] config::ConfigError),
#[error(transparent)]
Hyper(#[from] hyper::Error),
}