pub enum KhrSegmented {}Expand description
Segmented sparse storage, taking advantage of Khronos’ predictable
reservation policy for SPIR-V instruction opcodes and ValueEnums:
- indices in
0..=4096are 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 UnsafeUnpin 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