/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
//! A type to represent a namespace.
usecrate::gecko_bindings::structs::nsAtom; usecrate::string_cache::{Atom, WeakAtom}; use precomputed_hash::PrecomputedHash; use std::borrow::Borrow; use std::fmt; use std::ops::Deref;
/// In Gecko namespaces are just regular atoms, so this is a simple macro to /// forward one macro to the other. #[macro_export]
macro_rules! ns {
() => {
$crate::string_cache::Namespace(atom!(""))
};
($s:tt) => {
$crate::string_cache::Namespace(atom!($s))
};
}
/// A Gecko namespace is just a wrapped atom. #[derive(
Clone,
Debug,
Default,
Eq,
Hash,
MallocSizeOf,
PartialEq,
ToComputedValue,
ToResolvedValue,
ToShmem,
)] #[repr(transparent)] pubstruct Namespace(pub Atom);
/// Clone this WeakNamespace to obtain a strong reference to the same /// underlying namespace. #[inline] pubfn clone(&self) -> Namespace {
Namespace(self.0.clone())
}
}
impl Eq for WeakNamespace {} impl PartialEq for WeakNamespace { #[inline] fn eq(&self, other: &Self) -> bool { let weak: *const WeakNamespace = self; let other: *const WeakNamespace = other;
weak == other
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet am 2026-06-24)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.