Add method to get index of interned layout

This commit is contained in:
Ayaz Hafiz 2023-01-30 15:53:37 -06:00
parent c1a937e393
commit c3064dad73
No known key found for this signature in database
GPG Key ID: 0E2A37416A25EF58

View File

@ -372,6 +372,10 @@ impl<'a> InLayout<'a> {
pub(crate) const unsafe fn from_index(index: usize) -> Self {
Self(index, PhantomData)
}
pub fn index(&self) -> usize {
self.0
}
}
/// A concurrent interner, suitable for usage between threads.