thisenum/lib.rs
1#![doc = include_str!("../README.md")]
2// --------------------------------------------------
3// external
4// --------------------------------------------------
5use thiserror::Error;
6pub use thisenum_impl::*;
7
8#[derive(Error, Debug)]
9/// All errors that can occur while using [`TryFrom`]
10/// implementation for [`Const`]
11pub enum Error {
12 #[error("Unable to convert `{0}` to `{1}`")]
13 InvalidValue(String, String),
14 #[error("Multiple associated enum arms defined with value `{0}`")]
15 UnreachableValue(String),
16 #[error("Unable to return variant `{0}` from constant, since the variant has nested arguments")]
17 UnableToReturnVariant(String),
18}