pub struct SwapStep {
    pub sqrt_ratio_next_x32: u64,
    pub amount_in: u64,
    pub amount_out: u64,
    pub fee_amount: u64,
}
Expand description

Result of a swap step

Fields

sqrt_ratio_next_x32: u64

The price after swapping the amount in/out, not to exceed the price target

amount_in: u64

The amount to be swapped in, of either token0 or token1, based on the direction of the swap

amount_out: u64

The amount to be received, of either token0 or token1, based on the direction of the swap

fee_amount: u64

The amount of input that will be taken as a fee

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.