/// Saturated multiplication of a scalar T to a primitive array of type T. If the
/// result from the mul overflows for this type, then
/// the result will be saturated
///
/// # Examples
/// ```
/// use arrow2::compute::arithmetics::basic::saturating_mul_scalar;
/// use arrow2::array::Int8Array;
///
/// let a = Int8Array::from(&[Some(-100i8)]);
/// let result = saturating_mul_scalar(&a, &100i8);
/// let expected = Int8Array::from(&[Some(-128i8)]);
/// assert_eq!(result, expected);
/// ```
Saturated multiplication of a scalar T to a primitive array of type T. If the
result from the mul overflows for this type, then
the result will be saturated
Saturated multiplication of a scalar T to a primitive array of type T . If the result from the mul overflows for this type then the result will be saturated
pub fn saturating_mul_scalar<T>(lhs: &PrimitiveArray<T>, rhs: &T) -> PrimitiveArray<T>
where
    T: NativeType + SaturatingMul<Output = T>,
{
    let rhs = *rhs;
    let op = move |a: T| a.saturating_mul(&rhs);
    unary(lhs, op, lhs.data_type().clone())
}
pub fn saturating_mul_scalar < T > ( lhs : & PrimitiveArray < T > , rhs : & T ) -> PrimitiveArray < T > where T : NativeType + SaturatingMul < Output = T > , { let rhs = * rhs ; let op = move | a : T | a . saturating_mul ( & rhs ) ; unary ( lhs , op , lhs . data_type ( ) . clone ( ) ) }
Saturated multiplication of a scalar T to a primitive array of type T. If the
result from the mul overflows for this type, then
the result will be saturated
Saturated multiplication of a scalar T to a primitive array of type T . If the result from the mul overflows for this type then the result will be saturated
lhs
&PrimitiveArray<T>
rhs
&T
examples
```
use arrow2::compute::arithmetics::basic::saturating_mul_scalar;
use arrow2::array::Int8Array.


` ` ` use arrow2 :: compute :: arithmetics :: basic :: saturating_mul_scalar ; use arrow2 :: array :: Int8Array .