kabu_types_entities/
calculation_result.rs

1use alloy_primitives::U256;
2use std::fmt::{Display, Formatter};
3
4#[derive(Debug, Clone)]
5pub struct CalculationResult {
6    pub amount_in: U256,
7    pub amount_out: U256,
8}
9
10impl CalculationResult {
11    pub fn new(amount_in: U256, amount_out: U256) -> Self {
12        Self { amount_in, amount_out }
13    }
14}
15
16impl Display for CalculationResult {
17    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
18        write!(f, "(amount_in={}, amount_out={})", self.amount_in, self.amount_out)
19    }
20}