use {
crate::domain::Atom,
cssparser::ToCss,
precomputed_hash::PrecomputedHash,
std::{borrow::Borrow, fmt},
};
#[derive(Default, Debug, Clone, Ord, PartialOrd, Eq, PartialEq, Hash)]
pub struct NamespaceUrl(pub Atom);
impl ToCss for NamespaceUrl {
fn to_css<W: fmt::Write>(&self, dest: &mut W) -> fmt::Result {
self.0.to_css(dest)
}
}
impl Borrow<str> for NamespaceUrl {
#[inline(always)]
fn borrow(&self) -> &str {
self.0.borrow()
}
}
impl PrecomputedHash for NamespaceUrl {
fn precomputed_hash(&self) -> u32 {
self.0.precomputed_hash()
}
}