Human-readable display of cost.
(&self)
| 682 | |
| 683 | /// Human-readable display of cost. |
| 684 | pub fn cost_display(&self) -> String { |
| 685 | if self.cost_usd < 0.01 { |
| 686 | format!("${:.4}", self.cost_usd) |
| 687 | } else { |
| 688 | format!("${:.2}", self.cost_usd) |
| 689 | } |
| 690 | } |
| 691 | } |
| 692 | |
| 693 | impl fmt::Display for Attestation { |