forked from python-project-templates/yardang
-
Notifications
You must be signed in to change notification settings - Fork 0
api crates calculator
Tim Paine edited this page Feb 7, 2026
·
1 revision
Version: 0.1.0
pub mod calculator;[source]
A simple calculator library demonstrating Rust documentation with sphinx-rust.
This crate provides basic arithmetic operations and a calculator struct that maintains a history of operations.
use calculator::{Calculator, Operation}; let mut calc = Calculator::new(); let result = calc.calculate(5.0, 3.0, Operation::Add); assert_eq!(result, 8.0); Calculator |
A calculator that performs basic arithmetic operations. |
|---|---|
ScientificCalculator |
A scientific calculator with additional mathematical functions. |
CalculatorError |
Errors that can occur during calculator operations. |
|---|