Struct Client

Source
pub struct Client<C> { /* private fields */ }
Expand description

GMSOL Client.

Implementations§

Source§

impl<C: Clone + Deref<Target = impl Signer>> Client<C>

Source

pub fn new_with_options( cluster: Cluster, payer: C, options: ClientOptions, ) -> Result<Self>

Create a new Client with the given options.

Source

pub fn new(cluster: Cluster, payer: C) -> Result<Self>

Create a new Client with default options.

Source

pub fn try_clone_with_payer<C2: Clone + Deref<Target = impl Signer>>( &self, payer: C2, ) -> Result<Client<C2>>

Try to clone a new client with a new payer.

Source

pub fn try_clone(&self) -> Result<Self>

Try to clone the client.

Source

pub fn set_subscription_config( &mut self, config: SubscriptionConfig, ) -> &mut Self

Replace the subscription config.

Source

pub fn anchor(&self) -> &Client<C>

Get anchor client.

Source

pub fn program(&self, program_id: Pubkey) -> Program<C>

Create a new Program with the given program id.

Source

pub fn cluster(&self) -> &Cluster

Get the cluster.

Source

pub fn commitment(&self) -> CommitmentConfig

Get the commitment config.

Source

pub fn payer(&self) -> Pubkey

Get the payer.

Source

pub fn rpc(&self) -> &RpcClient

Get RPC Client.

Source

pub fn store_program(&self) -> &Program<C>

Get the store program.

Source

pub fn treasury_program(&self) -> &Program<C>

Get the treasury program.

Source

pub fn timelock_program(&self) -> &Program<C>

Get the timelock program.

Source

pub fn new_store_program(&self) -> Result<Program<C>>

Create a new store program.

Source

pub fn new_treasury_program(&self) -> Result<Program<C>>

Create a new treasury program.

Source

pub fn store_program_id(&self) -> &Pubkey

Get the program id of the store program.

Source

pub fn treasury_program_id(&self) -> &Pubkey

Get the program id of the treasury program.

Source

pub fn timelock_program_id(&self) -> &Pubkey

Get the program id of the timelock program.

Source

pub fn store_transaction(&self) -> TransactionBuilder<'_, C>

Create a transaction builder for the store program.

Source

pub fn treasury_transaction(&self) -> TransactionBuilder<'_, C>

Create a transaction builder for the treasury program.

Source

pub fn timelock_transaction(&self) -> TransactionBuilder<'_, C>

Create a transaction builder for the timelock program.

Source

pub fn bundle_with_options( &self, options: BundleOptions, ) -> BundleBuilder<'_, C>

Create a bundle builder with the given options.

Source

pub fn bundle(&self) -> BundleBuilder<'_, C>

Create a BundleBuilder

Source

pub fn find_store_address(&self, key: &str) -> Pubkey

Find PDA for Store account.

Source

pub fn find_store_wallet_address(&self, store: &Pubkey) -> Pubkey

Find PDA for store wallet account.

Source

pub fn store_event_authority(&self) -> Pubkey

Get the event authority address for the Store program.

Source

pub fn find_market_vault_address( &self, store: &Pubkey, token: &Pubkey, ) -> Pubkey

Find PDA for market vault account.

Source

pub fn find_market_token_address( &self, store: &Pubkey, index_token: &Pubkey, long_token: &Pubkey, short_token: &Pubkey, ) -> Pubkey

Find PDA for market token mint account.

Source

pub fn find_market_address(&self, store: &Pubkey, token: &Pubkey) -> Pubkey

Find PDA for market account.

Source

pub fn find_deposit_address( &self, store: &Pubkey, user: &Pubkey, nonce: &NonceBytes, ) -> Pubkey

Find PDA for deposit account.

Source

pub fn find_first_deposit_owner_address(&self) -> Pubkey

Find first deposit owner address.

Source

pub fn find_withdrawal_address( &self, store: &Pubkey, user: &Pubkey, nonce: &NonceBytes, ) -> Pubkey

Find DPA for withdrawal account.

Source

pub fn find_order_address( &self, store: &Pubkey, user: &Pubkey, nonce: &NonceBytes, ) -> Pubkey

Find PDA for order.

Source

pub fn find_shift_address( &self, store: &Pubkey, owner: &Pubkey, nonce: &NonceBytes, ) -> Pubkey

Find PDA for shift.

Source

pub fn find_position_address( &self, store: &Pubkey, user: &Pubkey, market_token: &Pubkey, collateral_token: &Pubkey, kind: PositionKind, ) -> Result<Pubkey>

Find PDA for position.

Source

pub fn find_claimable_account_address( &self, store: &Pubkey, mint: &Pubkey, user: &Pubkey, time_key: &[u8], ) -> Pubkey

Find claimable account address.

Source

pub fn find_trade_event_buffer_address( &self, store: &Pubkey, authority: &Pubkey, index: u16, ) -> Pubkey

Find trade event buffer address.

Source

pub fn find_user_address(&self, store: &Pubkey, owner: &Pubkey) -> Pubkey

Find User account address.

Source

pub fn find_referral_code_address( &self, store: &Pubkey, code: ReferralCodeBytes, ) -> Pubkey

Find referral code address.

Source

pub fn find_glv_token_address(&self, store: &Pubkey, index: u16) -> Pubkey

Find GLV token address.

Source

pub fn find_glv_address(&self, glv_token: &Pubkey) -> Pubkey

Find GLV address.

Source

pub fn find_glv_deposit_address( &self, store: &Pubkey, owner: &Pubkey, nonce: &NonceBytes, ) -> Pubkey

Find GLV deposit address.

Source

pub fn find_glv_withdrawal_address( &self, store: &Pubkey, owner: &Pubkey, nonce: &NonceBytes, ) -> Pubkey

Find GLV withdrawal address.

Source

pub fn find_gt_exchange_vault_address( &self, store: &Pubkey, time_window_index: i64, time_window: u32, ) -> Pubkey

Find GT exchange vault address.

Source

pub fn find_gt_exchange_address(&self, vault: &Pubkey, owner: &Pubkey) -> Pubkey

Find GT exchange address.

Source

pub fn find_price_feed_address( &self, store: &Pubkey, authority: &Pubkey, index: u16, provider: PriceProviderKind, token: &Pubkey, ) -> Pubkey

Find Custom Price Feed address.

Source

pub fn find_treasury_config_address(&self, store: &Pubkey) -> Pubkey

Find treasury global config address.

Source

pub fn find_treasury_vault_config_address( &self, config: &Pubkey, index: u16, ) -> Pubkey

Find treasury vault config address.

Source

pub fn find_gt_bank_address( &self, treasury_vault_config: &Pubkey, gt_exchange_vault: &Pubkey, ) -> Pubkey

Find GT bank address.

Source

pub fn find_treasury_receiver_address(&self, config: &Pubkey) -> Pubkey

Find treasury receiver address.

Source

pub fn find_timelock_config_address(&self, store: &Pubkey) -> Pubkey

Find timelock config address.

Source

pub fn find_executor_address( &self, store: &Pubkey, role: &str, ) -> Result<Pubkey>

Find executor address.

Source

pub fn find_executor_wallet_address(&self, executor: &Pubkey) -> Pubkey

Find the wallet address of the given executor.

Source

pub async fn get_slot( &self, commitment: Option<CommitmentConfig>, ) -> Result<u64>

Get slot.

Source

pub async fn store_accounts_with_config<T>( &self, filter_by_store: Option<StoreFilter>, other_filters: impl IntoIterator<Item = RpcFilterType>, config: ProgramAccountsConfig, ) -> Result<WithContext<Vec<(Pubkey, T)>>>
where T: AccountDeserialize + Discriminator,

Fetch accounts owned by the Store Program.

Source

pub async fn account_with_config<T>( &self, address: &Pubkey, config: RpcAccountInfoConfig, ) -> Result<WithContext<Option<T>>>
where T: AccountDeserialize,

Fetch account at the given address with config.

The value inside the returned context will be None if the account does not exist.

Source

pub async fn account<T: AccountDeserialize>( &self, address: &Pubkey, ) -> Result<Option<T>>

Fetch account at the given address.

Source

pub async fn store_accounts<T>( &self, filter_by_store: Option<StoreFilter>, other_filters: impl IntoIterator<Item = RpcFilterType>, ) -> Result<Vec<(Pubkey, T)>>
where T: AccountDeserialize + Discriminator,

Fetch accounts owned by the Store Program.

Source

pub async fn store(&self, address: &Pubkey) -> Result<Arc<Store>>

Fetch Store account with its address.

Source

pub async fn user(&self, address: &Pubkey) -> Result<UserHeader>

Fetch user account with its address.

Source

pub async fn authorized_token_map_address( &self, store: &Pubkey, ) -> Result<Option<Pubkey>>

Fetch the TokenMap address of the given store.

Source

pub async fn token_map(&self, address: &Pubkey) -> Result<TokenMap>

Fetch TokenMap account with its address.

Source

pub async fn authorized_token_map(&self, store: &Pubkey) -> Result<TokenMap>

Fetch the authorized token map of the given store.

Source

pub async fn markets_with_config( &self, store: &Pubkey, config: ProgramAccountsConfig, ) -> Result<WithContext<BTreeMap<Pubkey, Market>>>

Fetch all Market accounts of the given store.

Source

pub async fn markets(&self, store: &Pubkey) -> Result<BTreeMap<Pubkey, Market>>

Fetch all Market accounts of the given store.

Source

pub async fn market_with_config<T>( &self, address: &Pubkey, config: RpcAccountInfoConfig, ) -> Result<WithContext<Option<Market>>>

Fetch Market at the given address with config.

The value inside the returned context will be None if the account does not exist.

Source

pub async fn market(&self, address: &Pubkey) -> Result<Arc<Market>>

Fetch Market account with its address.

Source

pub async fn glvs_with_config( &self, store: &Pubkey, config: ProgramAccountsConfig, ) -> Result<WithContext<BTreeMap<Pubkey, Glv>>>

Fetch all Glv accounts of the given store.

Source

pub async fn glvs(&self, store: &Pubkey) -> Result<BTreeMap<Pubkey, Glv>>

Fetch all Glv accounts of the given store.

Source

pub async fn market_status( &self, store: &Pubkey, market_token: &Pubkey, prices: Prices<u128>, maximize_pnl: bool, maximize_pool_value: bool, ) -> Result<MarketStatus>

Fetch MarketStatus with the market token address.

Source

pub async fn market_token_price( &self, store: &Pubkey, market_token: &Pubkey, prices: Prices<u128>, pnl_factor: PnlFactorKind, maximize: bool, ) -> Result<u128>

Fetch current market token price with the market token address.

Source

pub async fn positions( &self, store: &Pubkey, owner: Option<&Pubkey>, market_token: Option<&Pubkey>, ) -> Result<BTreeMap<Pubkey, Position>>

Fetch all Position accounts of the given owner of the given store.

Source

pub async fn position(&self, address: &Pubkey) -> Result<Position>

Fetch Position account with its address.

Source

pub async fn order(&self, address: &Pubkey) -> Result<Order>

Fetch Order account with its address.

Source

pub async fn order_with_config( &self, address: &Pubkey, config: RpcAccountInfoConfig, ) -> Result<WithContext<Option<Order>>>

Fetch Order account at the the given address with config.

The value inside the returned context will be None if the account does not exist.

Source

pub async fn orders( &self, store: &Pubkey, owner: Option<&Pubkey>, market_token: Option<&Pubkey>, ) -> Result<BTreeMap<Pubkey, Order>>

Fetch all Order accounts of the given owner of the given store.

Source

pub async fn deposit(&self, address: &Pubkey) -> Result<Deposit>

Fetch Depsoit account with its address.

Source

pub async fn withdrawal(&self, address: &Pubkey) -> Result<Withdrawal>

Fetch Withdrawal account with its address.

Source

pub async fn price_feed(&self, address: &Pubkey) -> Result<Option<PriceFeed>>

Fetch PriceFeed account with its address.

Source

pub async fn instruction_buffer( &self, address: &Pubkey, ) -> Result<Option<InstructionBuffer>>

Fetch InstructionBuffer account with its address.

Source

pub async fn pub_sub(&self) -> Result<&PubsubClient>

Get the PubsubClient.

Source

pub async fn subscribe_store_cpi_events( &self, commitment: Option<CommitmentConfig>, ) -> Result<impl Stream<Item = Result<WithSlot<Vec<StoreCPIEvent>>>>>

Subscribe to StoreCPIEvents from the store program.

Source

pub async fn historical_store_cpi_events( &self, address: &Pubkey, commitment: Option<CommitmentConfig>, ) -> Result<impl Stream<Item = Result<WithSlot<Vec<StoreCPIEvent>>>>>

Fetch historical StoreCPIEvents for the given account.

Source

pub async fn complete_order( &self, address: &Pubkey, commitment: Option<CommitmentConfig>, ) -> Result<Option<TradeEvent>>

Wait for an order to be completed using current slot as min context slot.

Source

pub async fn last_order_events( &self, order: &Pubkey, before_slot: u64, commitment: CommitmentConfig, ) -> Result<Vec<StoreCPIEvent>>

Get last order events.

Source

pub async fn complete_order_with_config( &self, address: &Pubkey, slot: u64, polling: Duration, commitment: Option<CommitmentConfig>, ) -> Result<Option<TradeEvent>>

Wait for an order to be completed with the given config.

Source

pub async fn shutdown(&self) -> Result<()>

Shutdown the client gracefully.

Source

pub async fn gt_exchanges( &self, store: &Pubkey, owner: &Pubkey, ) -> Result<BTreeMap<Pubkey, GtExchange>>

Get GT exchanges.

Source§

impl<C: Deref<Target = impl Signer> + Clone> Client<C>

Source

pub fn create_first_glv_deposit( &self, store: &Pubkey, glv_token: &Pubkey, market_token: &Pubkey, ) -> CreateGlvDepositBuilder<'_, C>

Create first GLV deposit.

Source§

impl<C: Deref<Target = impl Signer> + Clone> Client<C>

Source

pub fn create_first_deposit( &self, store: &Pubkey, market_token: &Pubkey, ) -> CreateDepositBuilder<'_, C>

Create first deposit.

Trait Implementations§

Source§

impl<C: Deref<Target = impl Signer> + Clone> AddressLookupTableOps<C> for Client<C>

Source§

async fn alt_with_config( &self, address: &Pubkey, config: RpcAccountInfoConfig, ) -> Result<WithSlot<Option<AddressLookupTableAccount>>>

Fetch address lookup table with the given config.
Source§

async fn create_alt(&self) -> Result<(TransactionBuilder<'_, C>, Pubkey)>

Create a TransactionBuilder to create address lookup table.
Source§

fn extend_alt( &self, alt: &Pubkey, new_addresses: Vec<Pubkey>, chunk_size: Option<usize>, ) -> Result<BundleBuilder<'_, C>>

Create a BundleBuilder to extend the given address lookup table with new addresses.
Source§

fn deactivate_alt(&self, alt: &Pubkey) -> TransactionBuilder<'_, C>

Create a TransactionBuilder to deactivate the given address lookup table
Source§

fn close_alt(&self, alt: &Pubkey) -> TransactionBuilder<'_, C>

Create a TransactionBuilder to close the given address lookup table
Source§

fn alt( &self, address: &Pubkey, ) -> impl Future<Output = Result<Option<AddressLookupTableAccount>>>

Fetch address lookup table.
Source§

impl<C, S> ConfigOps<C> for Client<C>
where C: Deref<Target = S> + Clone, S: Signer,

Source§

fn insert_global_amount( &self, store: &Pubkey, key: &str, amount: &Amount, ) -> TransactionBuilder<'_, C>

Insert a global amount.
Source§

fn insert_global_factor( &self, store: &Pubkey, key: &str, factor: &Factor, ) -> TransactionBuilder<'_, C>

Insert a global factor.
Source§

fn insert_global_address( &self, store: &Pubkey, key: &str, address: &Pubkey, ) -> TransactionBuilder<'_, C>

Insert a global address.
Source§

fn insert_global_amount_by_key( &self, store: &Pubkey, key: AmountKey, amount: &Amount, ) -> TransactionBuilder<'_, C>

Insert a global amount by key.
Source§

fn insert_global_factor_by_key( &self, store: &Pubkey, key: FactorKey, factor: &Factor, ) -> TransactionBuilder<'_, C>

Insert a global factor by key.
Source§

fn insert_global_address_by_key( &self, store: &Pubkey, key: AddressKey, address: &Pubkey, ) -> TransactionBuilder<'_, C>

Insert a global address by key.
Source§

impl<S, C> ExchangeOps<C> for Client<C>
where C: Deref<Target = S> + Clone, S: Signer,

Source§

fn toggle_feature( &self, store: &Pubkey, domian: DomainDisabledFlag, action: ActionDisabledFlag, enable: bool, ) -> TransactionBuilder<'_, C>

Toggle feature.
Source§

fn claim_fees( &self, store: &Pubkey, market_token: &Pubkey, is_long_token: bool, ) -> ClaimFeesBuilder<'_, C>

Claim fees.
Source§

fn create_deposit( &self, store: &Pubkey, market_token: &Pubkey, ) -> CreateDepositBuilder<'_, C>

Create a deposit.
Source§

fn close_deposit( &self, store: &Pubkey, deposit: &Pubkey, ) -> CloseDepositBuilder<'_, C>

Cancel a deposit.
Source§

fn execute_deposit( &self, store: &Pubkey, oracle: &Pubkey, deposit: &Pubkey, cancel_on_execution_error: bool, ) -> ExecuteDepositBuilder<'_, C>

Execute a deposit.
Source§

fn create_withdrawal( &self, store: &Pubkey, market_token: &Pubkey, amount: u64, ) -> CreateWithdrawalBuilder<'_, C>

Create a withdrawal.
Source§

fn close_withdrawal( &self, store: &Pubkey, withdrawal: &Pubkey, ) -> CloseWithdrawalBuilder<'_, C>

Close a withdrawal.
Source§

fn execute_withdrawal( &self, store: &Pubkey, oracle: &Pubkey, withdrawal: &Pubkey, cancel_on_execution_error: bool, ) -> ExecuteWithdrawalBuilder<'_, C>

Execute a withdrawal.
Source§

async fn create_market( &self, store: &Pubkey, name: &str, index_token: &Pubkey, long_token: &Pubkey, short_token: &Pubkey, enable: bool, token_map: Option<&Pubkey>, ) -> Result<(TransactionBuilder<'_, C>, Pubkey)>

Create a new market and return its token mint address.
Source§

async fn fund_market( &self, store: &Pubkey, market_token: &Pubkey, source_account: &Pubkey, amount: u64, token: Option<&Pubkey>, ) -> Result<TransactionBuilder<'_, C>>

Fund the given market.
Source§

fn create_order( &self, store: &Pubkey, market_token: &Pubkey, is_output_token_long: bool, params: OrderParams, ) -> CreateOrderBuilder<'_, C>

Create an order.
Source§

fn update_order( &self, store: &Pubkey, market_token: &Pubkey, order: &Pubkey, params: UpdateOrderParams, ) -> Result<TransactionBuilder<'_, C>>

Update an order.
Source§

fn execute_order( &self, store: &Pubkey, oracle: &Pubkey, order: &Pubkey, cancel_on_execution_error: bool, ) -> Result<ExecuteOrderBuilder<'_, C>>

Execute an order.
Source§

fn close_order(&self, order: &Pubkey) -> Result<CloseOrderBuilder<'_, C>>

Close an order.
Source§

async fn cancel_order_if_no_position( &self, store: &Pubkey, order: &Pubkey, position_hint: Option<&Pubkey>, ) -> Result<TransactionBuilder<'_, C>>

Cancel order if the position does not exist.
Source§

fn liquidate( &self, oracle: &Pubkey, position: &Pubkey, ) -> Result<PositionCutBuilder<'_, C>>

Liquidate a position.
Source§

fn auto_deleverage( &self, oracle: &Pubkey, position: &Pubkey, size_delta_usd: u128, ) -> Result<PositionCutBuilder<'_, C>>

Auto-deleverage a position.
Source§

fn update_adl( &self, store: &Pubkey, oracle: &Pubkey, market_token: &Pubkey, for_long: bool, for_short: bool, ) -> Result<UpdateAdlBuilder<'_, C>>

Update ADL state.
Source§

fn create_shift( &self, store: &Pubkey, from_market_token: &Pubkey, to_market_token: &Pubkey, amount: u64, ) -> CreateShiftBuilder<'_, C>

Create shift.
Source§

fn close_shift(&self, shift: &Pubkey) -> CloseShiftBuilder<'_, C>

Close shift.
Source§

fn execute_shift( &self, oracle: &Pubkey, shift: &Pubkey, cancel_on_execution_error: bool, ) -> ExecuteShiftBuilder<'_, C>

Execute shift.
Source§

fn market_increase( &self, store: &Pubkey, market_token: &Pubkey, is_collateral_token_long: bool, initial_collateral_amount: u64, is_long: bool, increment_size_in_usd: u128, ) -> CreateOrderBuilder<'_, C>

Create a market increase position order.
Source§

fn market_decrease( &self, store: &Pubkey, market_token: &Pubkey, is_collateral_token_long: bool, collateral_withdrawal_amount: u64, is_long: bool, decrement_size_in_usd: u128, ) -> CreateOrderBuilder<'_, C>

Create a market decrease position order.
Source§

fn market_swap<'a, S>( &self, store: &Pubkey, market_token: &Pubkey, is_output_token_long: bool, initial_swap_in_token: &Pubkey, initial_swap_in_token_amount: u64, swap_path: impl IntoIterator<Item = &'a Pubkey>, ) -> CreateOrderBuilder<'_, C>
where C: Deref<Target = S> + Clone, S: Signer,

Create a market swap order.
Source§

fn limit_increase( &self, store: &Pubkey, market_token: &Pubkey, is_long: bool, increment_size_in_usd: u128, price: u128, is_collateral_token_long: bool, initial_collateral_amount: u64, ) -> CreateOrderBuilder<'_, C>

Create a limit increase order.
Source§

fn limit_decrease( &self, store: &Pubkey, market_token: &Pubkey, is_long: bool, decrement_size_in_usd: u128, price: u128, is_collateral_token_long: bool, collateral_withdrawal_amount: u64, ) -> CreateOrderBuilder<'_, C>

Create a limit decrease order.
Source§

fn stop_loss( &self, store: &Pubkey, market_token: &Pubkey, is_long: bool, decrement_size_in_usd: u128, price: u128, is_collateral_token_long: bool, collateral_withdrawal_amount: u64, ) -> CreateOrderBuilder<'_, C>

Create a stop-loss decrease order.
Source§

fn limit_swap<'a, S>( &self, store: &Pubkey, market_token: &Pubkey, is_output_token_long: bool, min_output_amount: u64, initial_swap_in_token: &Pubkey, initial_swap_in_token_amount: u64, swap_path: impl IntoIterator<Item = &'a Pubkey>, ) -> CreateOrderBuilder<'_, C>
where C: Deref<Target = S> + Clone, S: Signer,

Create a limit swap order.
Source§

impl<C: Deref<Target = impl Signer> + Clone> GlvOps<C> for Client<C>

Source§

fn initialize_glv( &self, store: &Pubkey, index: u16, market_tokens: impl IntoIterator<Item = Pubkey>, ) -> Result<(TransactionBuilder<'_, C>, Pubkey)>

Initialize GLV.
Source§

fn update_glv_market_config( &self, store: &Pubkey, glv_token: &Pubkey, market_token: &Pubkey, max_amount: Option<u64>, max_value: Option<u128>, ) -> TransactionBuilder<'_, C>

GLV Update Market Config.
Source§

fn toggle_glv_market_flag( &self, store: &Pubkey, glv_token: &Pubkey, market_token: &Pubkey, flag: GlvMarketFlag, enable: bool, ) -> TransactionBuilder<'_, C>

GLV toggle market flag.
Source§

fn update_glv_config( &self, store: &Pubkey, glv_token: &Pubkey, params: UpdateGlvParams, ) -> TransactionBuilder<'_, C>

Update GLV config.
Source§

fn insert_glv_market( &self, store: &Pubkey, glv_token: &Pubkey, market_token: &Pubkey, token_program_id: Option<&Pubkey>, ) -> TransactionBuilder<'_, C>

Insert GLV market.
Source§

fn remove_glv_market( &self, store: &Pubkey, glv_token: &Pubkey, market_token: &Pubkey, token_program_id: Option<&Pubkey>, ) -> TransactionBuilder<'_, C>

Remove GLV market.
Source§

fn create_glv_deposit( &self, store: &Pubkey, glv_token: &Pubkey, market_token: &Pubkey, ) -> CreateGlvDepositBuilder<'_, C>

Create a GLV deposit.
Source§

fn close_glv_deposit( &self, glv_deposit: &Pubkey, ) -> CloseGlvDepositBuilder<'_, C>

Close a GLV deposit.
Source§

fn execute_glv_deposit( &self, oracle: &Pubkey, glv_deposit: &Pubkey, cancel_on_execution_error: bool, ) -> ExecuteGlvDepositBuilder<'_, C>

Execute the given GLV deposit.
Source§

fn create_glv_withdrawal( &self, store: &Pubkey, glv_token: &Pubkey, market_token: &Pubkey, amount: u64, ) -> CreateGlvWithdrawalBuilder<'_, C>

Source§

fn close_glv_withdrawal( &self, glv_withdrawal: &Pubkey, ) -> CloseGlvWithdrawalBuilder<'_, C>

Close a GLV withdrawal.
Source§

fn execute_glv_withdrawal( &self, oracle: &Pubkey, glv_withdrawal: &Pubkey, cancel_on_execution_error: bool, ) -> ExecuteGlvWithdrawalBuilder<'_, C>

Execute the given GLV deposit.
Source§

fn create_glv_shift( &self, store: &Pubkey, glv_token: &Pubkey, from_market_token: &Pubkey, to_market_token: &Pubkey, amount: u64, ) -> CreateGlvShiftBuilder<'_, C>

Source§

fn close_glv_shift(&self, glv_shift: &Pubkey) -> CloseGlvShiftBuilder<'_, C>

Source§

fn execute_glv_shift( &self, oracle: &Pubkey, glv_shift: &Pubkey, cancel_on_execution_error: bool, ) -> ExecuteGlvShiftBuilder<'_, C>

Source§

impl<C: Deref<Target = impl Signer> + Clone> GtOps<C> for Client<C>

Source§

fn initialize_gt( &self, store: &Pubkey, decimals: u8, initial_minting_cost: u128, grow_factor: u128, grow_step: u64, ranks: Vec<u64>, ) -> TransactionBuilder<'_, C>

Initialize GT Mint.
Source§

fn gt_set_order_fee_discount_factors( &self, store: &Pubkey, factors: Vec<u128>, ) -> TransactionBuilder<'_, C>

Configurate GT order fee dicounts.
Source§

fn gt_set_referral_reward_factors( &self, store: &Pubkey, factors: Vec<u128>, ) -> TransactionBuilder<'_, C>

Configurate GT referral rewards
Source§

fn gt_set_exchange_time_window( &self, store: &Pubkey, window: u32, ) -> TransactionBuilder<'_, C>

Configurate the time window size for GT exchange.
Source§

fn prepare_gt_exchange_vault_with_time_window_index( &self, store: &Pubkey, time_window_index: i64, time_window: u32, ) -> TransactionBuilder<'_, C, Pubkey>

Initialize GT exchange vault with the given time window index.
Source§

fn confirm_gt_exchange_vault( &self, store: &Pubkey, vault: &Pubkey, ) -> TransactionBuilder<'_, C>

Confirm the given GT exchange vault.
Source§

fn request_gt_exchange_with_time_window_index( &self, store: &Pubkey, time_window_index: i64, time_window: u32, amount: u64, ) -> TransactionBuilder<'_, C>

Request GT exchange with the given time window index.
Source§

async fn close_gt_exchange( &self, store: &Pubkey, exchange: &Pubkey, hint_owner: Option<&Pubkey>, hint_vault: Option<&Pubkey>, ) -> Result<TransactionBuilder<'_, C>>

Close a confirmed GT exchange.
Source§

fn prepare_gt_exchange_vault_with_time_window( &self, store: &Pubkey, time_window: u32, ) -> Result<TransactionBuilder<'_, C, Pubkey>>

Prepare GT exchange vault with the given time window.
Source§

fn request_gt_exchange_with_time_window( &self, store: &Pubkey, time_window: u32, amount: u64, ) -> Result<TransactionBuilder<'_, C>>

Request GT exchange with the given time window.
Source§

impl<C: Deref<Target = impl Signer> + Clone> IdlOps<C> for Client<C>

Source§

fn create_idl_account( &self, program_id: &Pubkey, data_len: u64, ) -> Result<TransactionBuilder<'_, C>>

Create IDL account.
Source§

fn resize_idl_account( &self, program_id: &Pubkey, account: Option<&Pubkey>, data_len: u64, ) -> Result<TransactionBuilder<'_, C>>

Resize buffer/account.
Source§

fn set_idl_buffer( &self, program_id: &Pubkey, buffer: &Pubkey, ) -> Result<TransactionBuilder<'_, C>>

Set IDL buffer.
Source§

fn set_idl_authority( &self, program_id: &Pubkey, account: Option<&Pubkey>, new_authority: &Pubkey, ) -> Result<TransactionBuilder<'_, C>>

Set IDL authority.
Source§

fn close_idl_account( &self, program_id: &Pubkey, account: Option<&Pubkey>, sol_destination: Option<&Pubkey>, ) -> Result<TransactionBuilder<'_, C>>

Close IDL buffer/account.
Source§

impl<C, S> MarketOps<C> for Client<C>
where C: Deref<Target = S> + Clone, S: Signer,

Source§

fn get_market_status( &self, store: &Pubkey, market_token: &Pubkey, prices: Prices<u128>, maximize_pnl: bool, maximize_pool_value: bool, ) -> TransactionBuilder<'_, C>

Get market status.
Source§

fn get_market_token_price( &self, store: &Pubkey, market_token: &Pubkey, prices: Prices<u128>, pnl_factor: PnlFactorKind, maximize: bool, ) -> TransactionBuilder<'_, C>

Get market token price.
Source§

fn update_market_config( &self, store: &Pubkey, market_token: &Pubkey, key: &str, value: &Factor, ) -> Result<TransactionBuilder<'_, C>>

Update market config.
Source§

fn update_market_config_flag( &self, store: &Pubkey, market_token: &Pubkey, key: &str, value: bool, ) -> Result<TransactionBuilder<'_, C>>

Update market config flag
Source§

fn toggle_market( &self, store: &Pubkey, market_token: &Pubkey, enable: bool, ) -> TransactionBuilder<'_, C>

Toggle market.
Source§

fn toggle_gt_minting( &self, store: &Pubkey, market_token: &Pubkey, enable: bool, ) -> TransactionBuilder<'_, C>

Toggle GT minting.
Source§

fn initialize_market_config_buffer<'a>( &'a self, store: &Pubkey, buffer: &'a dyn Signer, expire_after_secs: u32, ) -> TransactionBuilder<'a, C>

Initialize Market Config Buffer.
Source§

fn close_marekt_config_buffer( &self, buffer: &Pubkey, receiver: Option<&Pubkey>, ) -> TransactionBuilder<'_, C>

Close Market Config Buffer.
Source§

fn push_to_market_config_buffer<K: ToString>( &self, buffer: &Pubkey, new_configs: impl IntoIterator<Item = (K, Factor)>, ) -> TransactionBuilder<'_, C>

Push to Market Config Buffer.
Source§

fn set_market_config_buffer_authority( &self, buffer: &Pubkey, new_authority: &Pubkey, ) -> TransactionBuilder<'_, C>

Set the authority of the Market Config Buffer.
Source§

fn update_market_config_with_buffer( &self, store: &Pubkey, market_token: &Pubkey, buffer: &Pubkey, ) -> TransactionBuilder<'_, C>

Update Market Config with the buffer.
Source§

fn update_market_config_by_key( &self, store: &Pubkey, market_token: &Pubkey, key: MarketConfigKey, value: &Factor, ) -> Result<TransactionBuilder<'_, C>>

Update market config by key.
Source§

fn update_market_config_flag_by_key( &self, store: &Pubkey, market_token: &Pubkey, key: MarketConfigFlag, value: bool, ) -> Result<TransactionBuilder<'_, C>>

Update market config flag by key.
Source§

impl<C, S> OracleOps<C> for Client<C>
where C: Deref<Target = S> + Clone, S: Signer,

Source§

async fn initialize_oracle<'a>( &'a self, store: &Pubkey, oracle: &'a dyn Signer, authority: Option<&Pubkey>, ) -> Result<(TransactionBuilder<'a, C>, Pubkey)>

Initialize Oracle account.
Source§

fn initialize_price_feed( &self, store: &Pubkey, index: u16, provider: PriceProviderKind, token: &Pubkey, feed_id: &Pubkey, ) -> (TransactionBuilder<'_, C>, Pubkey)

Initialize Price Feed.
Update price feed with chainlink.
Source§

impl<C, S> RolesOps<C> for Client<C>
where C: Deref<Target = S> + Clone, S: Signer,

Source§

fn enable_role(&self, store: &Pubkey, role: &str) -> TransactionBuilder<'_, C>

Enable a role.
Source§

fn disable_role(&self, store: &Pubkey, role: &str) -> TransactionBuilder<'_, C>

Disable a role.
Source§

fn grant_role( &self, store: &Pubkey, user: &Pubkey, role: &str, ) -> TransactionBuilder<'_, C>

Grant a role to user.
Source§

fn revoke_role( &self, store: &Pubkey, user: &Pubkey, role: &str, ) -> TransactionBuilder<'_, C>

Revoke a role from the user.
Source§

impl<C, S> StoreOps<C> for Client<C>
where C: Deref<Target = S> + Clone, S: Signer,

Source§

fn initialize_store<S2: Signer + 'static>( &self, key: &str, authority: Option<S2>, receiver: Option<S2>, holding: Option<S2>, ) -> TransactionBuilder<'_, C>

Initialize Store account.
Source§

fn transfer_store_authority( &self, store: &Pubkey, next_authority: &Pubkey, ) -> TransactionBuilder<'_, C>

Transfer store authority.
Source§

fn accept_store_authority(&self, store: &Pubkey) -> TransactionBuilder<'_, C>

Accept store authority.
Source§

fn transfer_receiver( &self, store: &Pubkey, new_receiver: &Pubkey, ) -> TransactionBuilder<'_, C>

Transfer receiver.
Source§

fn set_token_map( &self, store: &Pubkey, token_map: &Pubkey, ) -> TransactionBuilder<'_, C>

Set new token map.
Source§

fn insert_factor( &self, store: &Pubkey, key: FactorKey, factor: Factor, ) -> TransactionBuilder<'_, C>

Insert factor.
Source§

impl<C: Clone + Deref<Target = impl Signer>> SystemProgramOps<C> for Client<C>

Source§

fn transfer( &self, to: &Pubkey, lamports: u64, ) -> Result<TransactionBuilder<'_, C>>

Transfer to.
Source§

impl<C: Deref<Target = impl Signer> + Clone> TimelockOps<C> for Client<C>

Source§

fn initialize_timelock_config( &self, store: &Pubkey, initial_delay: u32, ) -> TransactionBuilder<'_, C, Pubkey>

Initialize TimelockConfig account.
Source§

fn increase_timelock_delay( &self, store: &Pubkey, delta: u32, ) -> TransactionBuilder<'_, C>

Increase timelock delay.
Source§

fn initialize_executor( &self, store: &Pubkey, role: &str, ) -> Result<TransactionBuilder<'_, C, Pubkey>>

Initialize Executor account.
Source§

fn create_timelocked_instruction( &self, store: &Pubkey, role: &str, buffer: impl Signer + 'static, instruction: Instruction, ) -> Result<TransactionBuilder<'_, C, Pubkey>>

Create a timelocked instruction buffer for the given instruction.
Source§

async fn approve_timelocked_instruction( &self, store: &Pubkey, buffer: &Pubkey, role_hint: Option<&str>, ) -> Result<TransactionBuilder<'_, C>>

Approve timelocked instruction.
Source§

async fn approve_timelocked_instructions( &self, store: &Pubkey, buffers: impl IntoIterator<Item = Pubkey>, role_hint: Option<&str>, ) -> Result<TransactionBuilder<'_, C>>

Approve timelocked instruction.
Source§

async fn cancel_timelocked_instruction( &self, store: &Pubkey, buffer: &Pubkey, executor_hint: Option<&Pubkey>, rent_receiver_hint: Option<&Pubkey>, ) -> Result<TransactionBuilder<'_, C>>

Cancel timelocked instruction.
Source§

async fn cancel_timelocked_instructions( &self, store: &Pubkey, buffers: impl IntoIterator<Item = Pubkey>, executor_hint: Option<&Pubkey>, rent_receiver_hint: Option<&Pubkey>, ) -> Result<TransactionBuilder<'_, C>>

Cancel timelocked instruction.
Source§

async fn execute_timelocked_instruction( &self, store: &Pubkey, buffer: &Pubkey, hint: Option<ExecuteTimelockedInstructionHint<'_>>, ) -> Result<TransactionBuilder<'_, C>>

Execute timelocked instruction.
Source§

fn timelock_bypassed_revoke_role( &self, store: &Pubkey, role: &str, address: &Pubkey, ) -> TransactionBuilder<'_, C>

Timelock-bypassed revoke role.
Source§

fn timelock_bypassed_set_epxected_price_provider( &self, store: &Pubkey, token_map: &Pubkey, token: &Pubkey, new_expected_price_provider: PriceProviderKind, ) -> TransactionBuilder<'_, C>

Timelock-bypassed set expected price provider.
Source§

impl<C, S> TokenAccountOps<C> for Client<C>
where C: Deref<Target = S> + Clone, S: Signer,

Source§

fn use_claimable_account( &self, store: &Pubkey, mint: &Pubkey, owner: &Pubkey, timestamp: i64, account: &Pubkey, amount: u64, ) -> TransactionBuilder<'_, C>

Prepare a claimable account.
Source§

fn close_empty_claimable_account( &self, store: &Pubkey, mint: &Pubkey, owner: &Pubkey, timestamp: i64, account: &Pubkey, ) -> TransactionBuilder<'_, C>

Close a claimable account if it is emtpy.
Source§

fn prepare_associated_token_account( &self, mint: &Pubkey, token_program_id: &Pubkey, owner: Option<&Pubkey>, ) -> TransactionBuilder<'_, C>

Prepare associated token account.
Source§

impl<C, S> TokenConfigOps<C> for Client<C>
where C: Deref<Target = S> + Clone, S: Signer,

Source§

fn initialize_token_map<'a>( &'a self, store: &Pubkey, token_map: &'a dyn Signer, ) -> (TransactionBuilder<'a, C>, Pubkey)

Initialize a TokenMap account.
Source§

fn insert_token_config( &self, store: &Pubkey, token_map: &Pubkey, name: &str, token: &Pubkey, builder: UpdateTokenConfigParams, enable: bool, new: bool, ) -> TransactionBuilder<'_, C>

Insert or update config for the given token.
Source§

fn insert_synthetic_token_config( &self, store: &Pubkey, token_map: &Pubkey, name: &str, token: &Pubkey, decimals: u8, builder: UpdateTokenConfigParams, enable: bool, new: bool, ) -> TransactionBuilder<'_, C>

Insert or update config the given synthetic token.
Source§

fn toggle_token_config( &self, store: &Pubkey, token_map: &Pubkey, token: &Pubkey, enable: bool, ) -> TransactionBuilder<'_, C>

Toggle token config.
Source§

fn set_expected_provider( &self, store: &Pubkey, token_map: &Pubkey, token: &Pubkey, provider: PriceProviderKind, ) -> TransactionBuilder<'_, C>

Set expected provider.
Source§

fn token_name( &self, token_map: &Pubkey, token: &Pubkey, ) -> TransactionBuilder<'_, C>

Get the name for the given token.
Source§

fn token_decimals( &self, token_map: &Pubkey, token: &Pubkey, ) -> TransactionBuilder<'_, C>

Get the token decimals for the given token.
Source§

fn token_precision( &self, token_map: &Pubkey, token: &Pubkey, ) -> TransactionBuilder<'_, C>

Get the price precision for the given token.
Source§

fn is_token_config_enabled( &self, token_map: &Pubkey, token: &Pubkey, ) -> TransactionBuilder<'_, C>

Check if the config of the given token is enbaled.
Source§

fn token_expected_provider( &self, token_map: &Pubkey, token: &Pubkey, ) -> TransactionBuilder<'_, C>

Get expected provider for the given token.
Source§

fn token_feed( &self, token_map: &Pubkey, token: &Pubkey, provider: PriceProviderKind, ) -> TransactionBuilder<'_, C>

Get feed address of the provider of the given token.
Source§

fn token_timestamp_adjustment( &self, token_map: &Pubkey, token: &Pubkey, provider: PriceProviderKind, ) -> TransactionBuilder<'_, C>

Get timestamp adjustment of the given token and provider.
Source§

async fn token_config( &self, token_map: &Pubkey, token: &Pubkey, ) -> Result<TokenConfig>

Get basic token config.
Source§

impl<S, C> TreasuryOps<C> for Client<C>
where C: Deref<Target = S> + Clone, S: Signer,

Source§

fn initialize_config(&self, store: &Pubkey) -> TransactionBuilder<'_, C, Pubkey>

Initialize Config account.
Source§

fn set_treasury_vault_config( &self, store: &Pubkey, treasury_vault_config: &Pubkey, ) -> TransactionBuilder<'_, C>

Set treasury vault config.
Source§

fn set_gt_factor( &self, store: &Pubkey, factor: u128, ) -> Result<TransactionBuilder<'_, C>>

Set GT factor.
Source§

fn set_buyback_factor( &self, store: &Pubkey, factor: u128, ) -> Result<TransactionBuilder<'_, C>>

Set buyback factor.
Source§

fn initialize_treasury_vault_config( &self, store: &Pubkey, index: u16, ) -> TransactionBuilder<'_, C, Pubkey>

Source§

async fn insert_token_to_treasury( &self, store: &Pubkey, treasury_vault_config: Option<&Pubkey>, token_mint: &Pubkey, ) -> Result<TransactionBuilder<'_, C>>

Insert token to treasury.
Source§

async fn remove_token_from_treasury( &self, store: &Pubkey, treasury_vault_config: Option<&Pubkey>, token_mint: &Pubkey, ) -> Result<TransactionBuilder<'_, C>>

Remove token from treasury.
Source§

async fn toggle_token_flag( &self, store: &Pubkey, treasury_vault_config: Option<&Pubkey>, token_mint: &Pubkey, flag: TokenFlag, value: bool, ) -> Result<TransactionBuilder<'_, C>>

Toggle token flag.
Source§

async fn deposit_to_treasury_valut( &self, store: &Pubkey, treasury_vault_config_hint: Option<&Pubkey>, token_mint: &Pubkey, token_program_id: Option<&Pubkey>, time_window: u32, ) -> Result<TransactionBuilder<'_, C, Pubkey>>

Deposit to treasury vault.
Source§

async fn withdraw_from_treasury_vault( &self, store: &Pubkey, treasury_vault_config_hint: Option<&Pubkey>, token_mint: &Pubkey, token_program_id: Option<&Pubkey>, amount: u64, decimals: u8, target: &Pubkey, ) -> Result<TransactionBuilder<'_, C>>

Withdraw from treasury vault.
Source§

fn confirm_gt_buyback( &self, store: &Pubkey, gt_exchange_vault: &Pubkey, oracle: &Pubkey, ) -> ConfirmGtBuybackBuilder<'_, C>

Confirm GT buyback.
Source§

fn transfer_receiver( &self, store: &Pubkey, new_receiver: &Pubkey, ) -> TransactionBuilder<'_, C>

Transfer receiver.
Source§

fn set_referral_reward( &self, store: &Pubkey, factors: Vec<u128>, ) -> TransactionBuilder<'_, C>

Set referral reward factors.
Source§

fn claim_fees_to_receiver_vault( &self, store: &Pubkey, market_token: &Pubkey, token_mint: &Pubkey, min_amount: u64, ) -> TransactionBuilder<'_, C>

Claim fees to receiver vault.
Source§

async fn prepare_gt_bank( &self, store: &Pubkey, treasury_vault_config_hint: Option<&Pubkey>, gt_exchange_vault: &Pubkey, ) -> Result<TransactionBuilder<'_, C, Pubkey>>

Prepare GT bank.
Source§

async fn sync_gt_bank( &self, store: &Pubkey, treasury_vault_config_hint: Option<&Pubkey>, gt_exchange_vault: &Pubkey, token_mint: &Pubkey, token_program_id: Option<&Pubkey>, ) -> Result<TransactionBuilder<'_, C>>

Sync GT bank.
Source§

async fn complete_gt_exchange( &self, store: &Pubkey, exchange: &Pubkey, treasury_vault_config_hint: Option<&Pubkey>, tokens_hint: Option<Vec<(Pubkey, Pubkey)>>, gt_exchange_vault_hint: Option<&Pubkey>, ) -> Result<TransactionBuilder<'_, C>>

Complete GT exchange.
Source§

async fn create_treasury_swap( &self, store: &Pubkey, market_token: &Pubkey, swap_in_token: &Pubkey, swap_out_token: &Pubkey, swap_in_token_amount: u64, options: CreateTreasurySwapOptions, ) -> Result<TransactionBuilder<'_, C, Pubkey>>

Create a swap.
Source§

async fn cancel_treasury_swap( &self, store: &Pubkey, order: &Pubkey, hint: Option<(&Pubkey, &Pubkey)>, ) -> Result<TransactionBuilder<'_, C>>

Cancel a swap.
Source§

impl<C: Deref<Target = impl Signer> + Clone> UserOps<C> for Client<C>

Source§

fn prepare_user(&self, store: &Pubkey) -> Result<TransactionBuilder<'_, C>>

Prepare User.
Source§

fn initialize_referral_code( &self, store: &Pubkey, code: ReferralCodeBytes, ) -> Result<TransactionBuilder<'_, C>>

Initialize Referral Code.
Source§

async fn set_referrer( &self, store: &Pubkey, code: ReferralCodeBytes, hint_referrer_user: Option<Pubkey>, ) -> Result<TransactionBuilder<'_, C>>

Set referrer.
Source§

async fn transfer_referral_code( &self, store: &Pubkey, receiver: &Pubkey, hint_code: Option<ReferralCodeBytes>, ) -> Result<TransactionBuilder<'_, C>>

Transfer referral code.
Source§

async fn cancel_referral_code_transfer( &self, store: &Pubkey, hint_code: Option<ReferralCodeBytes>, ) -> Result<TransactionBuilder<'_, C>>

Cancel referral code transfer.
Source§

async fn accept_referral_code( &self, store: &Pubkey, code: ReferralCodeBytes, hint_owner: Option<Pubkey>, ) -> Result<TransactionBuilder<'_, C>>

Accept referral code transfer.
Source§

impl<C, S> VaultOps<C> for Client<C>
where C: Deref<Target = S> + Clone, S: Signer,

Source§

fn initialize_market_vault( &self, store: &Pubkey, token: &Pubkey, ) -> (TransactionBuilder<'_, C>, Pubkey)

Initialize a market vault for the given token.

Auto Trait Implementations§

§

impl<C> !Freeze for Client<C>

§

impl<C> !RefUnwindSafe for Client<C>

§

impl<C> Send for Client<C>
where C: Send + Sync,

§

impl<C> Sync for Client<C>
where C: Sync + Send,

§

impl<C> Unpin for Client<C>
where C: Unpin,

§

impl<C> !UnwindSafe for Client<C>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T