pub struct QueryPoolSwapParams { /* private fields */ }Expand description
Represents the parameters for query_max_trade.
§Fields
token_in- The token being sold (swapped into the pool)token_out- The token being bought (swapped out of the pool)swap_constraint- Type of price constraint to be applied. See SwapConstraint.
Implementations§
Source§impl QueryPoolSwapParams
impl QueryPoolSwapParams
pub fn new( token_in: Token, token_out: Token, swap_constraint: SwapConstraint, ) -> Self
Sourcepub fn token_in(&self) -> &Token
pub fn token_in(&self) -> &Token
Returns a reference to the input token (token being sold into the pool)
Sourcepub fn token_out(&self) -> &Token
pub fn token_out(&self) -> &Token
Returns a reference to the output token (token being bought out of the pool)
Sourcepub fn swap_constraint(&self) -> &SwapConstraint
pub fn swap_constraint(&self) -> &SwapConstraint
Returns a reference to the price constraint
Trait Implementations§
Source§impl Clone for QueryPoolSwapParams
impl Clone for QueryPoolSwapParams
Source§fn clone(&self) -> QueryPoolSwapParams
fn clone(&self) -> QueryPoolSwapParams
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for QueryPoolSwapParams
impl Debug for QueryPoolSwapParams
Source§impl PartialEq for QueryPoolSwapParams
impl PartialEq for QueryPoolSwapParams
impl StructuralPartialEq for QueryPoolSwapParams
Auto Trait Implementations§
impl !Freeze for QueryPoolSwapParams
impl RefUnwindSafe for QueryPoolSwapParams
impl Send for QueryPoolSwapParams
impl Sync for QueryPoolSwapParams
impl Unpin for QueryPoolSwapParams
impl UnwindSafe for QueryPoolSwapParams
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)