cleanup the slab types

- get rid of HeaderOrIdxPtr
- add IndexPtrSlab
- add UntypedArenaSlab
- add to_untyped for converting a typed slab into an unsyped slab
- remove TypedArenaPtr::new, as they shouldn't be created outside of this module
This commit is contained in:
Bennet Bleßmann
2024-07-07 15:47:50 +02:00
parent 1b19ae81d5
commit 689632b51c
2 changed files with 95 additions and 70 deletions

View File

@@ -710,6 +710,7 @@ impl UntypedArenaPtr {
/// # Safety
/// - this UntypedArenaPtr actuall pointee type is T
/// - the pointer must be non-null
#[inline]
pub unsafe fn as_typed_ptr<T: ?Sized + ArenaAllocated>(self) -> TypedArenaPtr<T>
where