pub struct CreateOrderHint {
pub long_token: StringPubkey,
pub short_token: StringPubkey,
}Expand description
Hint for CreateOrder.
Fields§
§long_token: StringPubkeyLong token.
short_token: StringPubkeyShort token.
Implementations§
Source§impl CreateOrderHint
impl CreateOrderHint
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 CreateOrderHint
impl Clone for CreateOrderHint
Source§fn clone(&self) -> CreateOrderHint
fn clone(&self) -> CreateOrderHint
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 CreateOrderHint
impl Debug for CreateOrderHint
Source§impl<'de> Deserialize<'de> for CreateOrderHint
impl<'de> Deserialize<'de> for CreateOrderHint
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 FromRpcClientWith<CreateOrder> for CreateOrderHint
impl FromRpcClientWith<CreateOrder> for CreateOrderHint
Source§async fn from_rpc_client_with<'a>(
builder: &'a CreateOrder,
client: &'a impl RpcClient,
) -> Result<Self>
async fn from_rpc_client_with<'a>( builder: &'a CreateOrder, client: &'a impl RpcClient, ) -> Result<Self>
Create from
RpcClient.Source§impl FromWasmAbi for CreateOrderHintwhere
Self: DeserializeOwned,
impl FromWasmAbi for CreateOrderHintwhere
Self: DeserializeOwned,
Source§impl OptionFromWasmAbi for CreateOrderHintwhere
Self: DeserializeOwned,
impl OptionFromWasmAbi for CreateOrderHintwhere
Self: DeserializeOwned,
Source§impl RefFromWasmAbi for CreateOrderHintwhere
Self: DeserializeOwned,
impl RefFromWasmAbi for CreateOrderHintwhere
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<CreateOrderHint>
type Anchor = SelfOwner<CreateOrderHint>
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 CreateOrderHint
impl Serialize for CreateOrderHint
Source§impl Tsify for CreateOrderHint
impl Tsify for CreateOrderHint
const DECL: &'static str = "/**\n * Hint for [`CreateOrder`].\n */\nexport interface CreateOrderHint {\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 CreateOrderHintwhere
Self: DeserializeOwned,
impl VectorFromWasmAbi for CreateOrderHintwhere
Self: DeserializeOwned,
type Abi = <JsType as VectorFromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Self]>
Source§impl WasmDescribeVector for CreateOrderHint
impl WasmDescribeVector for CreateOrderHint
Auto Trait Implementations§
impl Freeze for CreateOrderHint
impl RefUnwindSafe for CreateOrderHint
impl Send for CreateOrderHint
impl Sync for CreateOrderHint
impl Unpin for CreateOrderHint
impl UnwindSafe for CreateOrderHint
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