pub enum KhrSegmented {}
Expand description
Segmented sparse storage, taking advantage of Khronos’ predictable
reservation policy for SPIR-V instruction opcodes and ValueEnum
s:
- indices in
0..=4096
are reserved for the standard, and mostly allocated without gaps (~84% density at the time of writing) - indices in
4096..
are allocated in blocks of64
; while sparser than the standard range, the blockiness allows some optimizations
Trait Implementations§
source§impl<I: FlatIdx, T> StorageShape<I, T> for KhrSegmented
impl<I: FlatIdx, T> StorageShape<I, T> for KhrSegmented
type Storage = KhrSegmentedVec<T>
fn get_by_idx(storage: &Self::Storage, idx: I) -> Option<&T>
Auto Trait Implementations§
impl Freeze for KhrSegmented
impl RefUnwindSafe for KhrSegmented
impl Send for KhrSegmented
impl Sync for KhrSegmented
impl Unpin for KhrSegmented
impl UnwindSafe for KhrSegmented
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more