encase

Macro impl_vector

Source
macro_rules! impl_vector {
    ($n:literal, $type:ty $( ; using $($using:tt)* )?) => { ... };
    ($n:literal, $type:ty; ($($generics:tt)*) $( ; using $($using:tt)* )?) => { ... };
    ($n:literal, $type:ty, $el_ty:ty $( ; using $($using:tt)* )?) => { ... };
}
Expand description

Used to implement ShaderType for the given vector type

The given vector type should implement any combination of AsRefVectorParts, AsMutVectorParts, FromVectorParts depending on needed capability (they can also be derived via $using)

ยงArgs

  • $n nr of elements the given vector contains

  • $type the type (representing a vector) for which ShaderType will be implemented for

  • $generics [optional] generics that will be passed into the impl< >

  • $el_type [optional] inner element type of the vector (should implement VectorScalar)

  • $using [optional] can be any combination of AsRef AsMut From