pub enum TypeSizeHint {
Static(usize),
RuntimeArray(ArraySizeHole),
Matrix(MatrixStrideHole),
UnknownArrayStride(UnknownStrideHole),
}Expand description
A size hint for a type. This could be a statically known size, or need to resolve a hole before getting a more accurate.
Size hints resolve array sizes involving specialization constants.
If an array stride is found, it will calculate a statically known size with the array stride.
Variants§
Static(usize)
A statically known type size hint.
RuntimeArray(ArraySizeHole)
The size of a runtime array, which is missing an element count.
Matrix(MatrixStrideHole)
A matrix type.
UnknownArrayStride(UnknownStrideHole)
The array stride is missing or unknowable.
Implementations§
Trait Implementations§
source§impl Clone for TypeSizeHint
impl Clone for TypeSizeHint
source§fn clone(&self) -> TypeSizeHint
fn clone(&self) -> TypeSizeHint
Returns a copy of the value. Read more
1.6.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TypeSizeHint
impl RefUnwindSafe for TypeSizeHint
impl Send for TypeSizeHint
impl Sync for TypeSizeHint
impl Unpin for TypeSizeHint
impl UnwindSafe for TypeSizeHint
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)