Skip to main content

eth_prices/quoter/
direction.rs

1use std::fmt::{self, Display};
2
3/// The direction to quote along a quoter edge.
4///
5/// `Forward` means `token0 -> token1` for the pair returned by [`super::Quoter::tokens`].
6/// `Reverse` means the inverse direction.
7#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
8pub enum RateDirection {
9    Forward,
10    Reverse,
11}
12
13impl Display for RateDirection {
14    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
15        write!(f, "{:?}", self)
16    }
17}