Struct stable_swap::curve::SwapResult
source · [−]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
sourceimpl Clone for SwapResult
impl Clone for SwapResult
sourcefn clone(&self) -> SwapResult
fn clone(&self) -> SwapResult
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
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 Copy for SwapResult
impl Eq for SwapResult
impl StructuralEq for SwapResult
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
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more