Returns the percentage of bytes saved (0.0 to 100.0).
(&self)
| 131 | |
| 132 | /// Returns the percentage of bytes saved (0.0 to 100.0). |
| 133 | pub fn savings_pct(&self) -> f64 { |
| 134 | let total = self.bytes_saved + self.bytes_needed; |
| 135 | if total == 0 { |
| 136 | return 0.0; |
| 137 | } |
| 138 | self.bytes_saved as f64 / total as f64 * 100.0 |
| 139 | } |
| 140 | |
| 141 | /// Returns the set of needed chunk hashes. |
| 142 | pub fn needed_hashes(&self) -> HashSet<[u8; 32]> { |
nothing calls this directly
no outgoing calls
no test coverage detected