//! Internal identifiers.
use std::{num::NonZeroU64, sync::atomic::*};
/// Type for all identifiers.
pub type Id = NonZeroU64;
/// Get the next unique identifier.
pub fn next() -> Id {
static NEXT: AtomicU64 = AtomicU64::new(1);
let next = NEXT.fetch_add(1, Ordering::SeqCst);
unsafe { NonZeroU64::new_unchecked(next) }
}