use crate::raw::{REGISTRY, RegistryEntry, RegistryId};
#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)]
pub struct RegistrationId {
index: usize
}
impl RegistrationId {
pub(crate) fn new(index: usize) -> Self {
Self { index }
}
#[inline]
pub(crate) fn index(self) -> usize {
self.index
}
#[inline]
#[allow(dead_code)]
pub(crate) fn registry(self) -> RegistryId {
self.entry().registry_id()
}
#[inline]
pub(crate) fn entry(self) -> &'static RegistryEntry {
®ISTRY[self.index]
}
}