Function safe_rem
Source pub fn safe_rem<T: SafeRem>(a: T, b: T) -> Result<T, SafeMathError>
Expand description
Performs safe remainder with division-by-zero checking.
Used internally by the #[safe_math] macro during expansion.
This function delegates to the appropriate trait method.
§Arguments
a - First operand.
b - Second operand.
§Returns
Ok(result) on success, Err(SafeMathError::DivisionByZero) on error.