pub struct PoolTokenHint {
pub long_token: StringPubkey,
pub short_token: StringPubkey,
}Expand description
Hint for pool tokens.
Fields§
§long_token: StringPubkeyLong token.
short_token: StringPubkeyShort token.
Implementations§
Source§impl PoolTokenHint
impl PoolTokenHint
Source§impl PoolTokenHint
impl PoolTokenHint
Sourcepub fn is_collateral_long(
&self,
collateral: &Pubkey,
) -> Result<bool, SolanaUtilsError>
pub fn is_collateral_long( &self, collateral: &Pubkey, ) -> Result<bool, SolanaUtilsError>
Returns whether the given token is long token or short token.
§Errors
- Returns Error if the given
collateralis not one of the specified long or short tokens.
Trait Implementations§
Source§impl Clone for PoolTokenHint
impl Clone for PoolTokenHint
Source§fn clone(&self) -> PoolTokenHint
fn clone(&self) -> PoolTokenHint
Returns a duplicate 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 moreSource§impl Debug for PoolTokenHint
impl Debug for PoolTokenHint
Source§impl<'de> Deserialize<'de> for PoolTokenHint
impl<'de> Deserialize<'de> for PoolTokenHint
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T> FromRpcClientWith<T> for PoolTokenHintwhere
T: StoreProgramIxBuilder + MarketTokenIxBuilder,
impl<T> FromRpcClientWith<T> for PoolTokenHintwhere
T: StoreProgramIxBuilder + MarketTokenIxBuilder,
Source§impl FromWasmAbi for PoolTokenHintwhere
Self: DeserializeOwned,
impl FromWasmAbi for PoolTokenHintwhere
Self: DeserializeOwned,
Source§impl OptionFromWasmAbi for PoolTokenHintwhere
Self: DeserializeOwned,
impl OptionFromWasmAbi for PoolTokenHintwhere
Self: DeserializeOwned,
Source§impl RefFromWasmAbi for PoolTokenHintwhere
Self: DeserializeOwned,
impl RefFromWasmAbi for PoolTokenHintwhere
Self: DeserializeOwned,
Source§type Abi = <JsType as RefFromWasmAbi>::Abi
type Abi = <JsType as RefFromWasmAbi>::Abi
The Wasm ABI type references to
Self are recovered from.Source§type Anchor = SelfOwner<PoolTokenHint>
type Anchor = SelfOwner<PoolTokenHint>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl Serialize for PoolTokenHint
impl Serialize for PoolTokenHint
Source§impl Tsify for PoolTokenHint
impl Tsify for PoolTokenHint
const DECL: &'static str = "/**\n * Hint for pool tokens.\n */\nexport interface PoolTokenHint {\n /**\n * Long token.\n */\n long_token: StringPubkey;\n /**\n * Short token.\n */\n short_token: StringPubkey;\n}"
const SERIALIZATION_CONFIG: SerializationConfig
Source§impl VectorFromWasmAbi for PoolTokenHintwhere
Self: DeserializeOwned,
impl VectorFromWasmAbi for PoolTokenHintwhere
Self: DeserializeOwned,
type Abi = <JsType as VectorFromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Self]>
Source§impl WasmDescribeVector for PoolTokenHint
impl WasmDescribeVector for PoolTokenHint
Auto Trait Implementations§
impl Freeze for PoolTokenHint
impl RefUnwindSafe for PoolTokenHint
impl Send for PoolTokenHint
impl Sync for PoolTokenHint
impl Unpin for PoolTokenHint
impl UnwindSafe for PoolTokenHint
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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