eth-prices 0.0.5

A library for fetching Ethereum prices.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::fmt::{self, Display};

/// The direction to quote along a quoter edge.
///
/// `Forward` means `token0 -> token1` for the pair returned by [`Quoter::get_tokens`].
/// `Reverse` means the inverse direction.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum RateDirection {
    Forward,
    Reverse,
}

impl Display for RateDirection {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(f, "{:?}", self)
    }
}