pub struct ExecuteOrderBuilder<'a, C> { /* private fields */ }
Expand description
Execute Order Builder.
Implementations§
Source§impl<'a, S, C> ExecuteOrderBuilder<'a, C>
impl<'a, S, C> ExecuteOrderBuilder<'a, C>
Sourcepub fn price_provider(&mut self, program: Pubkey) -> &mut Self
pub fn price_provider(&mut self, program: Pubkey) -> &mut Self
Set price provider to the given.
Sourcepub fn event_buffer_index(&mut self, index: u16) -> &mut Self
pub fn event_buffer_index(&mut self, index: u16) -> &mut Self
Set event buffer index.
Sourcepub fn add_alt(&mut self, account: AddressLookupTableAccount) -> &mut Self
pub fn add_alt(&mut self, account: AddressLookupTableAccount) -> &mut Self
Insert an Address Lookup Table.
Sourcepub fn hint(
&mut self,
order: &Order,
market: &Market,
store: &Arc<Store>,
map: &impl TokenMapAccess,
user: Option<&UserHeader>,
) -> Result<&mut Self>
pub fn hint( &mut self, order: &Order, market: &Market, store: &Arc<Store>, map: &impl TokenMapAccess, user: Option<&UserHeader>, ) -> Result<&mut Self>
Set hint with the given order.
Sourcepub async fn prepare_hint(&mut self) -> Result<ExecuteOrderHint>
pub async fn prepare_hint(&mut self) -> Result<ExecuteOrderHint>
Prepare ExecuteOrderHint
.
Sourcepub fn recent_timestamp(&mut self, timestamp: i64) -> &mut Self
pub fn recent_timestamp(&mut self, timestamp: i64) -> &mut Self
Set recent timestamp with the given.
Default to current unix timestamp.
Sourcepub async fn claimable_accounts(&mut self) -> Result<[Pubkey; 3]>
pub async fn claimable_accounts(&mut self) -> Result<[Pubkey; 3]>
Get claimable accounts.
The returned values are of the form [long_for_user, short_for_user, pnl_for_holding]
.
Trait Implementations§
Source§impl<'a, C: Deref<Target = impl Signer> + Clone> MakeBundleBuilder<'a, C> for ExecuteOrderBuilder<'a, C>
impl<'a, C: Deref<Target = impl Signer> + Clone> MakeBundleBuilder<'a, C> for ExecuteOrderBuilder<'a, C>
Source§async fn build_with_options(
&mut self,
options: BundleOptions,
) -> Result<BundleBuilder<'a, C>>
async fn build_with_options( &mut self, options: BundleOptions, ) -> Result<BundleBuilder<'a, C>>
Build with options.
Source§impl<C: Deref<Target = impl Signer> + Clone> PullOraclePriceConsumer for ExecuteOrderBuilder<'_, C>
impl<C: Deref<Target = impl Signer> + Clone> PullOraclePriceConsumer for ExecuteOrderBuilder<'_, C>
Source§async fn feed_ids(&mut self) -> Result<FeedIds>
async fn feed_ids(&mut self) -> Result<FeedIds>
Returns a reference to tokens and their associated feed IDs that require price updates.
Source§fn process_feeds(
&mut self,
provider: PriceProviderKind,
map: FeedAddressMap,
) -> Result<()>
fn process_feeds( &mut self, provider: PriceProviderKind, map: FeedAddressMap, ) -> Result<()>
Processes the feed address map returned from the pull oracle.
Source§impl<C> SetExecutionFee for ExecuteOrderBuilder<'_, C>
impl<C> SetExecutionFee for ExecuteOrderBuilder<'_, C>
Source§fn set_execution_fee(&mut self, lamports: u64) -> &mut Self
fn set_execution_fee(&mut self, lamports: u64) -> &mut Self
Set execution fee.
Source§fn is_execution_fee_estimation_required(&self) -> bool
fn is_execution_fee_estimation_required(&self) -> bool
Whether the execution fee needed to be estiamted.
Auto Trait Implementations§
impl<'a, C> Freeze for ExecuteOrderBuilder<'a, C>
impl<'a, C> !RefUnwindSafe for ExecuteOrderBuilder<'a, C>
impl<'a, C> !Send for ExecuteOrderBuilder<'a, C>
impl<'a, C> !Sync for ExecuteOrderBuilder<'a, C>
impl<'a, C> Unpin for ExecuteOrderBuilder<'a, C>
impl<'a, C> !UnwindSafe for ExecuteOrderBuilder<'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