DoxigAlpha

uncheckedAt

Function parameters

Parameters

#
self:anytype
index:usize

This is a stack data structure where pointers to indexes have the same lifetime as the data structure

Functions

#
SegmentedList
This is a stack data structure where pointers to indexes have the same lifetime as the data structure

Source

Implementation

#
pub fn uncheckedAt(self: anytype, index: usize) AtType(@TypeOf(self)) {
    if (index < prealloc_item_count) {
        return &self.prealloc_segment[index];
    }
    const shelf_index = shelfIndex(index);
    const box_index = boxIndex(index, shelf_index);
    return &self.dynamic_segments[shelf_index][box_index];
}