Struct manifest_jupiter::ManifestLocalMarket
source · pub struct ManifestLocalMarket { /* private fields */ }
Implementations§
source§impl ManifestLocalMarket
impl ManifestLocalMarket
pub fn get_base_mint(&self) -> Pubkey
pub fn get_quote_mint(&self) -> Pubkey
Trait Implementations§
source§impl Amm for ManifestLocalMarket
impl Amm for ManifestLocalMarket
source§fn get_swap_and_account_metas(
&self,
swap_params: &SwapParams<'_, '_>
) -> Result<SwapAndAccountMetas>
fn get_swap_and_account_metas( &self, swap_params: &SwapParams<'_, '_> ) -> Result<SwapAndAccountMetas>
ManifestLocalMarket::update should be called once before calling this method
fn program_id(&self) -> Pubkey
source§fn get_reserve_mints(&self) -> Vec<Pubkey>
fn get_reserve_mints(&self) -> Vec<Pubkey>
The mints that can be traded
source§fn get_accounts_to_update(&self) -> Vec<Pubkey>
fn get_accounts_to_update(&self) -> Vec<Pubkey>
The accounts necessary to produce a quote
fn from_keyed_account( keyed_account: &KeyedAccount, _amm_context: &AmmContext ) -> Result<Self>
source§fn update(&mut self, account_map: &AccountMap) -> Result<()>
fn update(&mut self, account_map: &AccountMap) -> Result<()>
Picks necessary accounts to update it’s internal state
Heavy deserialization and precomputation caching should be done in this function
fn quote(&self, quote_params: &QuoteParams) -> Result<Quote>
fn clone_amm(&self) -> Box<dyn Amm + Send + Sync>
source§fn has_dynamic_accounts(&self) -> bool
fn has_dynamic_accounts(&self) -> bool
Indicates if get_accounts_to_update might return a non constant vec
fn get_user_setup(&self) -> Option<AmmUserSetup>
source§fn unidirectional(&self) -> bool
fn unidirectional(&self) -> bool
It can only trade in one direction from its first mint to second mint, assuming it is a two mint AMM
source§fn program_dependencies(&self) -> Vec<(Pubkey, String)>
fn program_dependencies(&self) -> Vec<(Pubkey, String)>
For testing purposes, provide a mapping of dependency programs to function
fn get_accounts_len(&self) -> usize
§fn requires_update_for_reserve_mints(&self) -> bool
fn requires_update_for_reserve_mints(&self) -> bool
Indicates whether
update
needs to be called before get_reserve_mints
fn supports_exact_out(&self) -> bool
§fn underlying_liquidities(&self) -> Option<HashSet<Pubkey>>
fn underlying_liquidities(&self) -> Option<HashSet<Pubkey>>
The identifier of the underlying liquidity Read more
source§impl Clone for ManifestLocalMarket
impl Clone for ManifestLocalMarket
source§fn clone(&self) -> ManifestLocalMarket
fn clone(&self) -> ManifestLocalMarket
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 ManifestLocalMarket
impl RefUnwindSafe for ManifestLocalMarket
impl Send for ManifestLocalMarket
impl Sync for ManifestLocalMarket
impl Unpin for ManifestLocalMarket
impl UnwindSafe for ManifestLocalMarket
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> DerefOrBorrow<T> for Twhere
T: ?Sized,
impl<T> DerefOrBorrow<T> for Twhere
T: ?Sized,
fn deref_or_borrow(&self) -> &T
source§impl<T> DerefOrBorrowMut<T> for Twhere
T: ?Sized,
impl<T> DerefOrBorrowMut<T> for Twhere
T: ?Sized,
fn deref_or_borrow_mut(&mut self) -> &mut T
§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