pub struct SwapResult {
pub new_source_amount: u64,
pub new_destination_amount: u64,
pub amount_swapped: u64,
pub admin_fee: u64,
pub fee: u64,
}
Expand description
Encodes all results of swapping from a source token to a destination token.
Fields§
§new_source_amount: u64
New amount of source token
new_destination_amount: u64
New amount of destination token
amount_swapped: u64
Amount of destination token swapped
admin_fee: u64
Admin fee for the swap
fee: u64
Fee for the swap
Trait Implementations§
Source§impl Clone for SwapResult
impl Clone for SwapResult
Source§fn clone(&self) -> SwapResult
fn clone(&self) -> SwapResult
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 moreSource§impl Debug for SwapResult
impl Debug for SwapResult
Source§impl PartialEq for SwapResult
impl PartialEq for SwapResult
impl Copy for SwapResult
impl Eq for SwapResult
impl StructuralPartialEq for SwapResult
Auto Trait Implementations§
impl Freeze for SwapResult
impl RefUnwindSafe for SwapResult
impl Send for SwapResult
impl Sync for SwapResult
impl Unpin for SwapResult
impl UnwindSafe for SwapResult
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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