Trait encase::CalculateSizeFor
source · 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§
sourcefn calculate_size_for(nr_of_el: u64) -> NonZeroU64
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.
impl<T, P: SharedPointerKind> CalculateSizeFor for Stack<T, P>where Self: ShaderType<ExtraMetadata = ArrayMetadata>,
Available on crate features
rpds
and archery
only.fn calculate_size_for(nr_of_el: u64) -> NonZeroU64
source§impl<T> CalculateSizeFor for VecDeque<T>where
Self: ShaderType<ExtraMetadata = ArrayMetadata>,
impl<T> CalculateSizeFor for VecDeque<T>where Self: ShaderType<ExtraMetadata = ArrayMetadata>,
fn calculate_size_for(nr_of_el: u64) -> NonZeroU64
source§impl<T, A: Array<Item = T>> CalculateSizeFor for SmallVec<A>where
Self: ShaderType<ExtraMetadata = ArrayMetadata>,
Available on crate feature smallvec
only.
impl<T, A: Array<Item = T>> CalculateSizeFor for SmallVec<A>where Self: ShaderType<ExtraMetadata = ArrayMetadata>,
Available on crate feature
smallvec
only.fn calculate_size_for(nr_of_el: u64) -> NonZeroU64
source§impl<T, A: Array<Item = T>> CalculateSizeFor for ArrayVec<A>where
Self: ShaderType<ExtraMetadata = ArrayMetadata>,
Available on crate feature tinyvec
only.
impl<T, A: Array<Item = T>> CalculateSizeFor for ArrayVec<A>where Self: ShaderType<ExtraMetadata = ArrayMetadata>,
Available on crate feature
tinyvec
only.fn calculate_size_for(nr_of_el: u64) -> NonZeroU64
source§impl<T: Clone> CalculateSizeFor for Vector<T>where
Self: ShaderType<ExtraMetadata = ArrayMetadata>,
Available on crate feature imbl
only.
impl<T: Clone> CalculateSizeFor for Vector<T>where Self: ShaderType<ExtraMetadata = ArrayMetadata>,
Available on crate feature
imbl
only.fn calculate_size_for(nr_of_el: u64) -> NonZeroU64
source§impl<T, A: Array<Item = T>> CalculateSizeFor for TinyVec<A>where
Self: ShaderType<ExtraMetadata = ArrayMetadata>,
Available on crate feature tinyvec
only.
impl<T, A: Array<Item = T>> CalculateSizeFor for TinyVec<A>where Self: ShaderType<ExtraMetadata = ArrayMetadata>,
Available on crate feature
tinyvec
only.fn calculate_size_for(nr_of_el: u64) -> NonZeroU64
source§impl<T> CalculateSizeFor for Cell<T>where
T: CalculateSizeFor + ?Sized + Copy,
impl<T> CalculateSizeFor for Cell<T>where T: CalculateSizeFor + ?Sized + Copy,
fn calculate_size_for(nr_of_el: u64) -> NonZeroU64
source§impl<T> CalculateSizeFor for LinkedList<T>where
Self: ShaderType<ExtraMetadata = ArrayMetadata>,
impl<T> CalculateSizeFor for LinkedList<T>where Self: ShaderType<ExtraMetadata = ArrayMetadata>,
fn calculate_size_for(nr_of_el: u64) -> NonZeroU64
source§impl<T> CalculateSizeFor for Rc<T>where
T: CalculateSizeFor + ?Sized,
impl<T> CalculateSizeFor for Rc<T>where T: CalculateSizeFor + ?Sized,
fn calculate_size_for(nr_of_el: u64) -> NonZeroU64
source§impl<T, P: SharedPointerKind> CalculateSizeFor for Queue<T, P>where
Self: ShaderType<ExtraMetadata = ArrayMetadata>,
Available on crate features rpds
and archery
only.
impl<T, P: SharedPointerKind> CalculateSizeFor for Queue<T, P>where Self: ShaderType<ExtraMetadata = ArrayMetadata>,
Available on crate features
rpds
and archery
only.fn calculate_size_for(nr_of_el: u64) -> NonZeroU64
source§impl<T> CalculateSizeFor for &mut Twhere
T: CalculateSizeFor + ?Sized,
impl<T> CalculateSizeFor for &mut Twhere T: CalculateSizeFor + ?Sized,
fn calculate_size_for(nr_of_el: u64) -> NonZeroU64
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.
impl<T, S: RawData<Elem = T>, D: Dimension> CalculateSizeFor for ArrayBase<S, D>where Self: ShaderType<ExtraMetadata = ArrayMetadata>,
Available on crate feature
ndarray
only.fn calculate_size_for(nr_of_el: u64) -> NonZeroU64
fn calculate_size_for(nr_of_el: u64) -> NonZeroU64
source§impl<T> CalculateSizeFor for [T]where
Self: ShaderType<ExtraMetadata = ArrayMetadata>,
impl<T> CalculateSizeFor for [T]where Self: ShaderType<ExtraMetadata = ArrayMetadata>,
fn calculate_size_for(nr_of_el: u64) -> NonZeroU64
source§impl<T: Clone> CalculateSizeFor for Vector<T>where
Self: ShaderType<ExtraMetadata = ArrayMetadata>,
Available on crate feature im
only.
impl<T: Clone> CalculateSizeFor for Vector<T>where Self: ShaderType<ExtraMetadata = ArrayMetadata>,
Available on crate feature
im
only.fn calculate_size_for(nr_of_el: u64) -> NonZeroU64
source§impl<T: Clone> CalculateSizeFor for Vector<T>where
Self: ShaderType<ExtraMetadata = ArrayMetadata>,
Available on crate feature im-rc
only.
impl<T: Clone> CalculateSizeFor for Vector<T>where Self: ShaderType<ExtraMetadata = ArrayMetadata>,
Available on crate feature
im-rc
only.fn calculate_size_for(nr_of_el: u64) -> NonZeroU64
source§impl<T> CalculateSizeFor for Cow<'_, T>where
T: CalculateSizeFor + ?Sized + ToOwned<Owned = T>,
impl<T> CalculateSizeFor for Cow<'_, T>where T: CalculateSizeFor + ?Sized + ToOwned<Owned = T>,
fn calculate_size_for(nr_of_el: u64) -> NonZeroU64
source§impl<T, P: SharedPointerKind> CalculateSizeFor for List<T, P>where
Self: ShaderType<ExtraMetadata = ArrayMetadata>,
Available on crate features rpds
and archery
only.
impl<T, P: SharedPointerKind> CalculateSizeFor for List<T, P>where Self: ShaderType<ExtraMetadata = ArrayMetadata>,
Available on crate features
rpds
and archery
only.fn calculate_size_for(nr_of_el: u64) -> NonZeroU64
source§impl<T> CalculateSizeFor for Arc<T>where
T: CalculateSizeFor + ?Sized,
impl<T> CalculateSizeFor for Arc<T>where T: CalculateSizeFor + ?Sized,
fn calculate_size_for(nr_of_el: u64) -> NonZeroU64
source§impl<T, P: SharedPointerKind> CalculateSizeFor for Vector<T, P>where
Self: ShaderType<ExtraMetadata = ArrayMetadata>,
Available on crate features rpds
and archery
only.
impl<T, P: SharedPointerKind> CalculateSizeFor for Vector<T, P>where Self: ShaderType<ExtraMetadata = ArrayMetadata>,
Available on crate features
rpds
and archery
only.fn calculate_size_for(nr_of_el: u64) -> NonZeroU64
source§impl<T> CalculateSizeFor for Vec<T>where
Self: ShaderType<ExtraMetadata = ArrayMetadata>,
impl<T> CalculateSizeFor for Vec<T>where Self: ShaderType<ExtraMetadata = ArrayMetadata>,
fn calculate_size_for(nr_of_el: u64) -> NonZeroU64
source§impl<T> CalculateSizeFor for &Twhere
T: CalculateSizeFor + ?Sized,
impl<T> CalculateSizeFor for &Twhere T: CalculateSizeFor + ?Sized,
fn calculate_size_for(nr_of_el: u64) -> NonZeroU64
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.
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.fn calculate_size_for(nr_of_el: u64) -> NonZeroU64
source§impl<T> CalculateSizeFor for Box<T>where
T: CalculateSizeFor + ?Sized,
impl<T> CalculateSizeFor for Box<T>where T: CalculateSizeFor + ?Sized,
fn calculate_size_for(nr_of_el: u64) -> NonZeroU64
source§impl<T, const N: usize> CalculateSizeFor for ArrayVec<T, N>where
Self: ShaderType<ExtraMetadata = ArrayMetadata>,
Available on crate feature arrayvec
only.
impl<T, const N: usize> CalculateSizeFor for ArrayVec<T, N>where Self: ShaderType<ExtraMetadata = ArrayMetadata>,
Available on crate feature
arrayvec
only.