macro_rules! match_each_pscalar {
($self:expr, | $scalar:ident | $body:block) => { ... };
}Expand description
Matches on all primitive type variants of PrimitiveScalar and executes the same code for
each variant branch.
This macro eliminates repetitive match statements when implementing operations that need to work
uniformly across all primitive type variants (U8, U16, U32, U64, I8, I16, I32,
I64, F16, F32, F64).
Works with both owned PrimitiveScalar and &PrimitiveScalar (the bound variable will be
PScalar<T> or &PScalar<T> respectively due to Rust’s match ergonomics).