Enum Pool

Source
pub enum Pool {
Show 21 variants UniswapV2(UniswapV2Pool), SushiSwapV2(UniswapV2Pool), PancakeSwapV2(UniswapV2Pool), BaseSwapV2(UniswapV2Pool), AlienBaseV2(UniswapV2Pool), SwapBasedV2(UniswapV2Pool), DackieSwapV2(UniswapV2Pool), Aerodrome(UniswapV2Pool), Slipstream(UniswapV3Pool), UniswapV3(UniswapV3Pool), SushiSwapV3(UniswapV3Pool), PancakeSwapV3(UniswapV3Pool), BaseSwapV3(UniswapV3Pool), AlienBaseV3(UniswapV3Pool), SwapBasedV3(UniswapV3Pool), DackieSwapV3(UniswapV3Pool), MaverickV1(MaverickPool), MaverickV2(MaverickPool), CurveTwoCrypto(CurveTwoCryptoPool), CurveTriCrypto(CurveTriCryptoPool), BalancerV2(BalancerV2Pool),
}
Expand description

Represents a populated pool from any of the supported protocols

Variants§

§

UniswapV2(UniswapV2Pool)

§

SushiSwapV2(UniswapV2Pool)

§

PancakeSwapV2(UniswapV2Pool)

§

BaseSwapV2(UniswapV2Pool)

§

AlienBaseV2(UniswapV2Pool)

§

SwapBasedV2(UniswapV2Pool)

§

DackieSwapV2(UniswapV2Pool)

§

Aerodrome(UniswapV2Pool)

§

Slipstream(UniswapV3Pool)

§

UniswapV3(UniswapV3Pool)

§

SushiSwapV3(UniswapV3Pool)

§

PancakeSwapV3(UniswapV3Pool)

§

BaseSwapV3(UniswapV3Pool)

§

AlienBaseV3(UniswapV3Pool)

§

SwapBasedV3(UniswapV3Pool)

§

DackieSwapV3(UniswapV3Pool)

§

MaverickV1(MaverickPool)

§

MaverickV2(MaverickPool)

§

CurveTwoCrypto(CurveTwoCryptoPool)

§

CurveTriCrypto(CurveTriCryptoPool)

§

BalancerV2(BalancerV2Pool)

Implementations§

Source§

impl Pool

Source

pub fn new_v2(pool_type: PoolType, pool: UniswapV2Pool) -> Self

Source

pub fn new_v3(pool_type: PoolType, pool: UniswapV3Pool) -> Self

Source

pub fn new_maverick(pool_type: PoolType, pool: MaverickPool) -> Self

Source

pub fn new_curve_two(pool_type: PoolType, pool: CurveTwoCryptoPool) -> Self

Source

pub fn new_curve_tri(pool_type: PoolType, pool: CurveTriCryptoPool) -> Self

Source

pub fn new_balancer(pool_type: PoolType, pool: BalancerV2Pool) -> Self

Source

pub fn is_v2(&self) -> bool

Source

pub fn is_v3(&self) -> bool

Source

pub fn is_maverick(&self) -> bool

Source

pub fn is_curve_two(&self) -> bool

Source

pub fn is_curve_tri(&self) -> bool

Source

pub fn is_balancer(&self) -> bool

Source

pub fn get_v2(&self) -> Option<&UniswapV2Pool>

Source

pub fn get_v3(&self) -> Option<&UniswapV3Pool>

Source

pub fn get_maverick(&self) -> Option<&MaverickPool>

Source

pub fn get_curve_two(&self) -> Option<&CurveTwoCryptoPool>

Source

pub fn get_curve_tri(&self) -> Option<&CurveTriCryptoPool>

Source

pub fn get_balancer(&self) -> Option<&BalancerV2Pool>

Source

pub fn get_v2_mut(&mut self) -> Option<&mut UniswapV2Pool>

Source

pub fn get_v3_mut(&mut self) -> Option<&mut UniswapV3Pool>

Source

pub fn get_maverick_mut(&mut self) -> Option<&mut MaverickPool>

Source

pub fn get_curve_two_mut(&mut self) -> Option<&mut CurveTwoCryptoPool>

Source

pub fn get_curve_tri_mut(&mut self) -> Option<&mut CurveTriCryptoPool>

Source

pub fn get_balancer_mut(&mut self) -> Option<&mut BalancerV2Pool>

Source

pub fn is_valid(&self) -> bool

Source

pub fn update_token1_name(pool: &mut Pool, token1: String)

Trait Implementations§

Source§

impl Clone for Pool

Source§

fn clone(&self) -> Pool

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Pool

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Pool

Source§

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

Source§

impl Serialize for Pool

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> TryClone for T
where T: Clone,

Source§

fn try_clone(&self) -> Result<T, Error>

Clones self, possibly returning an error.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> RpcObject for T
where T: RpcParam + RpcReturn,

Source§

impl<T> RpcObject for T
where T: RpcParam + RpcReturn,

Source§

impl<T> RpcParam for T
where T: Serialize + Clone + Debug + Send + Sync + Unpin,

Source§

impl<T> RpcParam for T
where T: Serialize + Clone + Debug + Send + Sync + Unpin,

Source§

impl<T> RpcReturn for T
where T: DeserializeOwned + Debug + Send + Sync + Unpin + 'static,

Source§

impl<T> RpcReturn for T
where T: DeserializeOwned + Debug + Send + Sync + Unpin + 'static,