pub struct CreateDepositBuilder<'a, C> { /* private fields */ }
Expand description
Create Deposit Builder.
Implementations§
Source§impl<C> CreateDepositBuilder<'_, C>
impl<C> CreateDepositBuilder<'_, C>
Sourcepub fn nonce(&mut self, nonce: NonceBytes) -> &mut Self
pub fn nonce(&mut self, nonce: NonceBytes) -> &mut Self
Set the nonce.
Sourcepub fn execution_fee(&mut self, fee: u64) -> &mut Self
pub fn execution_fee(&mut self, fee: u64) -> &mut Self
Set execution fee. Defaults to min execution fee.
Sourcepub fn min_market_token(&mut self, amount: u64) -> &mut Self
pub fn min_market_token(&mut self, amount: u64) -> &mut Self
Set min market token to mint.
Sourcepub fn long_token_swap_path(&mut self, market_tokens: Vec<Pubkey>) -> &mut Self
pub fn long_token_swap_path(&mut self, market_tokens: Vec<Pubkey>) -> &mut Self
Set long swap path.
Sourcepub fn short_token_swap_path(&mut self, market_tokens: Vec<Pubkey>) -> &mut Self
pub fn short_token_swap_path(&mut self, market_tokens: Vec<Pubkey>) -> &mut Self
Set short swap path.
Sourcepub fn receiver(&mut self, receiver: Option<Pubkey>) -> &mut Self
pub fn receiver(&mut self, receiver: Option<Pubkey>) -> &mut Self
Set recevier. Defaults to the payer.
Sourcepub fn should_unwrap_native_token(&mut self, should_unwrap: bool) -> &mut Self
pub fn should_unwrap_native_token(&mut self, should_unwrap: bool) -> &mut Self
Set whether to unwrap native token. Defaults to should unwrap.
Source§impl<'a, C, S> CreateDepositBuilder<'a, C>
impl<'a, C, S> CreateDepositBuilder<'a, C>
Sourcepub fn long_token(
&mut self,
amount: u64,
token: Option<&Pubkey>,
token_account: Option<&Pubkey>,
) -> &mut Self
pub fn long_token( &mut self, amount: u64, token: Option<&Pubkey>, token_account: Option<&Pubkey>, ) -> &mut Self
Set the initial long token params for deposit.
Sourcepub fn short_token(
&mut self,
amount: u64,
token: Option<&Pubkey>,
token_account: Option<&Pubkey>,
) -> &mut Self
pub fn short_token( &mut self, amount: u64, token: Option<&Pubkey>, token_account: Option<&Pubkey>, ) -> &mut Self
Set the initial short token params for deposit.
Sourcepub async fn build_with_address(
&self,
) -> Result<(TransactionBuilder<'a, C>, Pubkey)>
pub async fn build_with_address( &self, ) -> Result<(TransactionBuilder<'a, C>, Pubkey)>
Build a TransactionBuilder
and return deposit address.
Auto Trait Implementations§
impl<'a, C> Freeze for CreateDepositBuilder<'a, C>
impl<'a, C> !RefUnwindSafe for CreateDepositBuilder<'a, C>
impl<'a, C> Send for CreateDepositBuilder<'a, C>
impl<'a, C> Sync for CreateDepositBuilder<'a, C>
impl<'a, C> Unpin for CreateDepositBuilder<'a, C>
impl<'a, C> !UnwindSafe for CreateDepositBuilder<'a, C>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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