pub struct CreateWithdrawalParams {
pub execution_lamports: u64,
pub long_token_swap_path_length: u8,
pub short_token_swap_path_length: u8,
pub market_token_amount: u64,
pub min_long_token_amount: u64,
pub min_short_token_amount: u64,
pub should_unwrap_native_token: bool,
}
Expand description
Create Withdrawal Params.
Fields§
§execution_lamports: u64
Execution fee in lamports.
long_token_swap_path_length: u8
The length of the swap path for long token.
short_token_swap_path_length: u8
The length of the swap path for short token.
market_token_amount: u64
Market token amount to burn.
min_long_token_amount: u64
The minimum acceptable final long token amount to receive.
min_short_token_amount: u64
The minimum acceptable final short token amount to receive.
should_unwrap_native_token: bool
Whether to unwrap native token when sending funds back.
Trait Implementations§
Source§impl ActionParams for CreateWithdrawalParams
impl ActionParams for CreateWithdrawalParams
Source§fn execution_lamports(&self) -> u64
fn execution_lamports(&self) -> u64
Get max allowed execution fee in lamports.
Source§impl BorshDeserialize for CreateWithdrawalParams
impl BorshDeserialize for CreateWithdrawalParams
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for CreateWithdrawalParams
impl BorshSerialize for CreateWithdrawalParams
Source§impl Clone for CreateWithdrawalParams
impl Clone for CreateWithdrawalParams
Source§fn clone(&self) -> CreateWithdrawalParams
fn clone(&self) -> CreateWithdrawalParams
Returns a copy 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 moreAuto Trait Implementations§
impl Freeze for CreateWithdrawalParams
impl RefUnwindSafe for CreateWithdrawalParams
impl Send for CreateWithdrawalParams
impl Sync for CreateWithdrawalParams
impl Unpin for CreateWithdrawalParams
impl UnwindSafe for CreateWithdrawalParams
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> 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