pub struct DenseEntityIndex { /* private fields */ }Expand description
Immutable direct-address index for sources whose offsets fit u32.
Construction refuses sparse ids when its arrays would exceed the three
compact input columns. Presence is separate from the span, so id zero and
an empty span at offset zero remain valid entries.
Implementations§
Source§impl DenseEntityIndex
impl DenseEntityIndex
Sourcepub fn try_from_columns(
ids: &[u32],
starts: &[u32],
lengths: &[u32],
) -> Option<Self>
pub fn try_from_columns( ids: &[u32], starts: &[u32], lengths: &[u32], ) -> Option<Self>
Build from strictly ascending, unique ids and parallel span columns.
Returns None for mismatched/unsorted columns, empty input, or a sparse
id range. The allocation bound is checked before allocating any array;
a lone u32::MAX id cannot request a multi-gigabyte allocation.
Auto Trait Implementations§
impl Freeze for DenseEntityIndex
impl RefUnwindSafe for DenseEntityIndex
impl Send for DenseEntityIndex
impl Sync for DenseEntityIndex
impl Unpin for DenseEntityIndex
impl UnwindSafe for DenseEntityIndex
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more