pub struct Swap { /* private fields */ }Expand description
A single atomic swap on one liquidity pool within a Route.
Implementations§
Source§impl Swap
impl Swap
Sourcepub fn component_id(&self) -> &str
pub fn component_id(&self) -> &str
The identifier of the liquidity pool component (e.g. a pool address).
Sourcepub fn amount_out(&self) -> &BigUint
pub fn amount_out(&self) -> &BigUint
Amount of token_out produced by this swap (token units).
Sourcepub fn gas_estimate(&self) -> &BigUint
pub fn gas_estimate(&self) -> &BigUint
Estimated gas units required to execute this swap.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Swap
impl RefUnwindSafe for Swap
impl Send for Swap
impl Sync for Swap
impl Unpin for Swap
impl UnsafeUnpin for Swap
impl UnwindSafe for Swap
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