1#![allow(missing_docs)]
2
3pub type Result<T, E = Error> = std::result::Result<T, E>;
4
5#[derive(Debug, thiserror::Error)]
6pub enum Error {
7 #[cfg(feature = "icu_locale_core")]
9 #[error("Failed to parse ICU locale: {0}")]
10 IcuLocaleParse(#[from] icu_locale_core::ParseError),
11 #[cfg(feature = "icu_locale_core")]
13 #[error("Unsupported ICU locale `{0}`.")]
14 UnsupportedIcuLocale(String),
15 #[cfg(feature = "whatlang")]
17 #[error("Unsupported whatlang base language subtag `{0}`.")]
18 UnsupportedWhatlangBase(&'static str),
19 #[cfg(feature = "whatlang")]
21 #[error("Unsupported whatlang Lang variant `{0:?}`.")]
22 UnsupportedWhatlangLang(whatlang::Lang),
23}