Struct spl_token_swap::curve::base::SwapResult
source · [−]pub struct SwapResult {
pub new_swap_source_amount: u128,
pub new_swap_destination_amount: u128,
pub source_amount_swapped: u128,
pub destination_amount_swapped: u128,
pub trade_fee: u128,
pub owner_fee: u128,
}
Expand description
Encodes all results of swapping from a source token to a destination token
Fields
new_swap_source_amount: u128
New amount of source token
new_swap_destination_amount: u128
New amount of destination token
source_amount_swapped: u128
Amount of source token swapped (includes fees)
destination_amount_swapped: u128
Amount of destination token swapped
trade_fee: u128
Amount of source tokens going to pool holders
owner_fee: u128
Amount of source tokens going to owner
Trait Implementations
sourceimpl Debug for SwapResult
impl Debug for SwapResult
sourceimpl PartialEq<SwapResult> for SwapResult
impl PartialEq<SwapResult> for SwapResult
sourcefn eq(&self, other: &SwapResult) -> bool
fn eq(&self, other: &SwapResult) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &SwapResult) -> bool
fn ne(&self, other: &SwapResult) -> bool
This method tests for !=
.
impl StructuralPartialEq for SwapResult
Auto Trait Implementations
impl RefUnwindSafe for SwapResult
impl Send for SwapResult
impl Sync for SwapResult
impl Unpin for SwapResult
impl UnwindSafe for SwapResult
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more