use core::fmt::{self, Display, Formatter};
#[cfg(feature = "std")]
use std::error::Error;
#[derive(Debug, Clone)]
pub enum UuidError {
Invalid,
SeparatorMust,
SeparatorDisallow,
}
impl Display for UuidError {
#[inline]
fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> {
match self {
Self::Invalid => f.write_str("invalid uuid"),
Self::SeparatorMust => f.write_str("separators not found"),
Self::SeparatorDisallow => f.write_str("separators not allowed"),
}
}
}
#[cfg(feature = "std")]
impl Error for UuidError {}