#![allow(missing_docs)]
pub type Result<T, E = Error> = std::result::Result<T, E>;
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("Unsupported language tag `{0}`.")]
UnsupportedLanguageTag(String),
#[cfg(feature = "icu_locale_core")]
#[error("Failed to parse ICU locale: {0}")]
IcuLocaleParse(#[from] icu_locale_core::ParseError),
#[cfg(feature = "icu_locale_core")]
#[error("Unsupported ICU locale `{0}`.")]
UnsupportedIcuLocale(String),
#[cfg(feature = "lingua")]
#[error("Unsupported lingua base language subtag `{0}`.")]
UnsupportedLinguaBase(&'static str),
#[cfg(feature = "lingua")]
#[error("Unsupported lingua Language variant `{0:?}`.")]
UnsupportedLinguaLanguage(lingua::Language),
#[cfg(feature = "whatlang")]
#[error("Unsupported whatlang base language subtag `{0}`.")]
UnsupportedWhatlangBase(&'static str),
#[cfg(feature = "whatlang")]
#[error("Unsupported whatlang Lang variant `{0:?}`.")]
UnsupportedWhatlangLang(whatlang::Lang),
}