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 ).
45use core::fmt::Display;
67#[derive(#[automatically_derived]
impl ::core::fmt::Debug for VarZeroVecFormatError {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
VarZeroVecFormatError::Metadata =>
::core::fmt::Formatter::write_str(f, "Metadata"),
VarZeroVecFormatError::Values(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Values",
&__self_0),
}
}
}Debug)]
8pub enum VarZeroVecFormatError {
9/// The byte buffer was not in the appropriate format for VarZeroVec.
10Metadata,
11/// One of the values could not be decoded.
12Values(crate::ule::UleError),
13}
1415impl core::error::Errorfor VarZeroVecFormatError {}
1617impl Displayfor VarZeroVecFormatError {
18fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
19match self{
20Self::Metadata => f.write_fmt(format_args!("VarZeroVecFormatError: metadata"))write!(f, "VarZeroVecFormatError: metadata"),
21Self::Values(e) => f.write_fmt(format_args!("VarZeroVecFormatError: {0}", e))write!(f, "VarZeroVecFormatError: {e}"),
22 }
23 }
24}