mod iri_or_string;
mod iris;
#[cfg(not(target_family = "wasm"))]
mod test;
mod visitor;
#[cfg(target_family = "wasm")]
mod wasm_stubs;
pub use iri_or_string::Iri;
pub use iris::IriS;
#[macro_export]
macro_rules! iri {
($lit: tt) => {
$crate::IriS::new_unchecked($lit)
};
}
#[macro_export]
macro_rules! static_once {
($name:ident, $type:ty, $init:expr) => {
pub fn $name() -> &'static $type {
static ONCE: std::sync::OnceLock<$type> = std::sync::OnceLock::new();
ONCE.get_or_init(|| $init)
}
};
}
#[macro_export]
macro_rules! iri_once {
($name:ident, $str:expr) => {
pub fn $name() -> &'static IriS {
static ONCE: std::sync::OnceLock<IriS> = std::sync::OnceLock::new();
ONCE.get_or_init(|| IriS::new_unchecked($str))
}
};
}