pub struct MarginalPriceParams<'a> { /* private fields */ }Expand description
Parameters for querying the spot price between two tokens.
Used to get the current marginal price for infinitesimally small trades between two tokens in a pool.
Implementations§
Source§impl<'a> MarginalPriceParams<'a>
impl<'a> MarginalPriceParams<'a>
Source§impl<'a> MarginalPriceParams<'a>
impl<'a> MarginalPriceParams<'a>
Sourcepub fn new(token_in: &'a TokenAddress, token_out: &'a TokenAddress) -> Self
pub fn new(token_in: &'a TokenAddress, token_out: &'a TokenAddress) -> Self
Creates new parameters for querying marginal price.
§Arguments
token_in- The input token addresstoken_out- The output token address
pub fn token_in(&self) -> &TokenAddress
pub fn token_out(&self) -> &TokenAddress
Trait Implementations§
Source§impl<'a> Clone for MarginalPriceParams<'a>
impl<'a> Clone for MarginalPriceParams<'a>
Source§fn clone(&self) -> MarginalPriceParams<'a>
fn clone(&self) -> MarginalPriceParams<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for MarginalPriceParams<'a>
impl<'a> RefUnwindSafe for MarginalPriceParams<'a>
impl<'a> Send for MarginalPriceParams<'a>
impl<'a> Sync for MarginalPriceParams<'a>
impl<'a> Unpin for MarginalPriceParams<'a>
impl<'a> UnsafeUnpin for MarginalPriceParams<'a>
impl<'a> UnwindSafe for MarginalPriceParams<'a>
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§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