use std::{fmt, io};
#[derive(Debug)]
#[repr(transparent)]
pub struct IoError(io::Error);
impl From<io::Error> for IoError {
fn from(value: io::Error) -> Self {
Self(value)
}
}
impl fmt::Display for IoError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}, kind={:?}", self.0, self.0.kind())?;
if let Some(raw) = self.0.raw_os_error() {
write!(f, ", raw={raw}")?;
}
Ok(())
}
}
pub(crate) const TAG_UXUM_NOT_FOUND: &str = "tag:uxum.github.io,2024:not_found";
pub(crate) const TAG_UXUM_ERROR: &str = "tag:uxum.github.io,2024:error";
pub(crate) const TAG_UXUM_PANIC: &str = "tag:uxum.github.io,2024:panic";
pub(crate) const TAG_UXUM_RATE_LIMIT: &str = "tag:uxum.github.io,2024:rate-limit";
pub(crate) const TAG_UXUM_AUTH: &str = "tag:uxum.github.io,2024:auth";
pub(crate) const TAG_UXUM_TIMEOUT: &str = "tag:uxum.github.io,2024:timeout";
pub(crate) const TAG_UXUM_METRICS: &str = "tag:uxum.github.io,2024:metrics";