pub enum Pool {
UniswapV2(UniswapV2Pool),
SushiSwapV2(UniswapV2Pool),
PancakeSwapV2(UniswapV2Pool),
Aerodrome(UniswapV2Pool),
BaseSwapV2(UniswapV2Pool),
UniswapV3(UniswapV3Pool),
SushiSwapV3(UniswapV3Pool),
PancakeSwapV3(UniswapV3Pool),
Slipstream(UniswapV3Pool),
BaseSwapV3(UniswapV3Pool),
AlienBase(UniswapV3Pool),
}Expand description
Represents a populated pool from any of the supported protocols
Variants§
UniswapV2(UniswapV2Pool)
SushiSwapV2(UniswapV2Pool)
PancakeSwapV2(UniswapV2Pool)
Aerodrome(UniswapV2Pool)
BaseSwapV2(UniswapV2Pool)
UniswapV3(UniswapV3Pool)
SushiSwapV3(UniswapV3Pool)
PancakeSwapV3(UniswapV3Pool)
Slipstream(UniswapV3Pool)
BaseSwapV3(UniswapV3Pool)
AlienBase(UniswapV3Pool)
Implementations§
source§impl Pool
impl Pool
pub fn new_v2(pool_type: PoolType, pool: UniswapV2Pool) -> Self
pub fn new_v3(pool_type: PoolType, pool: UniswapV3Pool) -> Self
pub fn is_v2(&self) -> bool
pub fn is_v3(&self) -> bool
pub fn get_v3(&self) -> Option<&UniswapV3Pool>
pub fn get_v2(&self) -> Option<&UniswapV2Pool>
pub fn get_v3_mut(&mut self) -> Option<&mut UniswapV3Pool>
pub fn get_v2_mut(&mut self) -> Option<&mut UniswapV2Pool>
Trait Implementations§
source§impl<'de> Deserialize<'de> for Pool
impl<'de> Deserialize<'de> for Pool
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PoolInfo for Pool
impl PoolInfo for Pool
fn address(&self) -> Address
fn token0_address(&self) -> Address
fn token1_address(&self) -> Address
fn token0_name(&self) -> String
fn token1_name(&self) -> String
fn token0_decimals(&self) -> u8
fn token1_decimals(&self) -> u8
fn pool_type(&self) -> PoolType
fn fee(&self) -> u32
fn stable(&self) -> bool
Auto Trait Implementations§
impl Freeze for Pool
impl RefUnwindSafe for Pool
impl Send for Pool
impl Sync for Pool
impl Unpin for Pool
impl UnwindSafe for Pool
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more