Skip to content

Glossary: Rust Beyond the Basics

checked_mul

Also written: checked_add

A method that multiplies and returns `Some(answer)`, or `None` if the result is too big for the type. `checked_add` does the same for addition, so the order service can reject huge orders instead of crashing.

Where the book teaches it

Related terms

overflow