Skip to main content

Crate financial_ops_macros

Crate financial_ops_macros 

Source
Expand description

Procedural macros for financial-ops.

This crate provides the checked! macro, which rewrites an ordinary arithmetic expression into a chain of the standard library’s checked arithmetic methods (checked_add, checked_sub, checked_mul, checked_div, checked_rem), recursively, while preserving the operator precedence and grouping of the original expression.

You normally do not depend on this crate directly; the macro is re-exported from financial-ops as financial_ops::checked.

Macros§

checked
Recursively rewrites an arithmetic expression into checked arithmetic.