icu_locale_core/preferences/extensions/unicode/
errors.rs

1// This file is part of ICU4X. For terms of use, please see the file
2// called LICENSE at the top level of the ICU4X source tree
3// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
4
5//! Errors related to parsing of Preferences.
6
7/// Error returned by parsers of unicode extensions as preferences.
8#[non_exhaustive]
9#[derive(#[automatically_derived]
impl ::core::fmt::Debug for PreferencesParseError {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f, "InvalidKeywordValue")
    }
}Debug, #[allow(non_upper_case_globals, unused_attributes, unused_qualifications)]
const _: () =
    {
        impl ::core::fmt::Display for PreferencesParseError {
            fn fmt(&self, formatter: &mut ::core::fmt::Formatter)
                -> ::core::fmt::Result {

                #[allow(unused_variables)]
                match self {
                    Self::InvalidKeywordValue => {
                        formatter.write_fmt(format_args!("The given keyword value is not a valid preference variant."))
                    }
                }
            }
        }
    };displaydoc::Display)]
10pub enum PreferencesParseError {
11    /// The given keyword value is not a valid preference variant.
12    InvalidKeywordValue,
13}
14
15impl core::error::Error for PreferencesParseError {}