| 1 | trait Calculator { |
| 2 | // Performs a primary calculation |
| 3 | fn calculate(&self, a: i32, b: i32) -> i32; |
| 4 | |
| 5 | // Modifies internal state based on input |
| 6 | fn accumulate(&mut self, value: i32); |
| 7 | |
| 8 | // Returns the current internal state |
| 9 | fn get_value(&self) -> i32; |
| 10 | |
| 11 | // Returns an identifier for the calculator type |
| 12 | fn id(&self) -> u8; |
| 13 | } |
| 14 | |
| 15 | trait CarrierValue { |
| 16 | fn carrier_value(self) -> i32; |
nothing calls this directly
no outgoing calls
no test coverage detected