pub trait CalculateSizeFor {
    // Required method
    fn calculate_size_for(nr_of_el: u64) -> NonZeroU64;
}
Expand description

Trait implemented for WGSL runtime-sized arrays and WGSL structs containing runtime-sized arrays (non fixed-footprint types)

Required Methods§

source

fn calculate_size_for(nr_of_el: u64) -> NonZeroU64

Returns the size of Self assuming the (contained) runtime-sized array has nr_of_el elements

Implementations on Foreign Types§

source§

impl<T, P: SharedPointerKind> CalculateSizeFor for Stack<T, P>where Self: ShaderType<ExtraMetadata = ArrayMetadata>,

Available on crate features rpds and archery only.
source§

impl<T> CalculateSizeFor for VecDeque<T>where Self: ShaderType<ExtraMetadata = ArrayMetadata>,

source§

impl<T, A: Array<Item = T>> CalculateSizeFor for SmallVec<A>where Self: ShaderType<ExtraMetadata = ArrayMetadata>,

Available on crate feature smallvec only.
source§

impl<T, A: Array<Item = T>> CalculateSizeFor for ArrayVec<A>where Self: ShaderType<ExtraMetadata = ArrayMetadata>,

Available on crate feature tinyvec only.
source§

impl<T: Clone> CalculateSizeFor for Vector<T>where Self: ShaderType<ExtraMetadata = ArrayMetadata>,

Available on crate feature imbl only.
source§

impl<T, A: Array<Item = T>> CalculateSizeFor for TinyVec<A>where Self: ShaderType<ExtraMetadata = ArrayMetadata>,

Available on crate feature tinyvec only.
source§

impl<T> CalculateSizeFor for Cell<T>where T: CalculateSizeFor + ?Sized + Copy,

source§

impl<T> CalculateSizeFor for LinkedList<T>where Self: ShaderType<ExtraMetadata = ArrayMetadata>,

source§

impl<T> CalculateSizeFor for Rc<T>where T: CalculateSizeFor + ?Sized,

source§

impl<T, P: SharedPointerKind> CalculateSizeFor for Queue<T, P>where Self: ShaderType<ExtraMetadata = ArrayMetadata>,

Available on crate features rpds and archery only.
source§

impl<T> CalculateSizeFor for &mut Twhere T: CalculateSizeFor + ?Sized,

source§

impl<T, S: RawData<Elem = T>, D: Dimension> CalculateSizeFor for ArrayBase<S, D>where Self: ShaderType<ExtraMetadata = ArrayMetadata>,

Available on crate feature ndarray only.
source§

impl<T, P: SharedPointerKind> CalculateSizeFor for SharedPointer<T, P>where T: CalculateSizeFor,

Available on crate feature archery only.
source§

impl<T> CalculateSizeFor for [T]where Self: ShaderType<ExtraMetadata = ArrayMetadata>,

source§

impl<T: Clone> CalculateSizeFor for Vector<T>where Self: ShaderType<ExtraMetadata = ArrayMetadata>,

Available on crate feature im only.
source§

impl<T: Clone> CalculateSizeFor for Vector<T>where Self: ShaderType<ExtraMetadata = ArrayMetadata>,

Available on crate feature im-rc only.
source§

impl<T> CalculateSizeFor for Cow<'_, T>where T: CalculateSizeFor + ?Sized + ToOwned<Owned = T>,

source§

impl<T, P: SharedPointerKind> CalculateSizeFor for List<T, P>where Self: ShaderType<ExtraMetadata = ArrayMetadata>,

Available on crate features rpds and archery only.
source§

impl<T> CalculateSizeFor for Arc<T>where T: CalculateSizeFor + ?Sized,

source§

impl<T, P: SharedPointerKind> CalculateSizeFor for Vector<T, P>where Self: ShaderType<ExtraMetadata = ArrayMetadata>,

Available on crate features rpds and archery only.
source§

impl<T> CalculateSizeFor for Vec<T>where Self: ShaderType<ExtraMetadata = ArrayMetadata>,

source§

impl<T> CalculateSizeFor for &Twhere T: CalculateSizeFor + ?Sized,

source§

impl<T, const NUM: usize, const DEN: usize> CalculateSizeFor for StaticRc<T, NUM, DEN>where T: CalculateSizeFor + ?Sized,

Available on crate feature static-rc only.
source§

impl<T> CalculateSizeFor for Box<T>where T: CalculateSizeFor + ?Sized,

source§

impl<T, const N: usize> CalculateSizeFor for ArrayVec<T, N>where Self: ShaderType<ExtraMetadata = ArrayMetadata>,

Available on crate feature arrayvec only.

Implementors§