Skip to main content

BybitClient

Struct BybitClient 

Source
pub struct BybitClient { /* private fields */ }
Expand description

Bybit HTTP API client.

Implementations§

Source§

impl BybitClient

Source

pub fn new(config: ClientConfig) -> Result<Self>

Create a new client with the given configuration.

Source

pub fn with_credentials( api_key: impl Into<String>, api_secret: impl Into<String>, ) -> Result<Self>

Create a new client with API credentials using default settings.

Source

pub fn testnet( api_key: impl Into<String>, api_secret: impl Into<String>, ) -> Result<Self>

Create a new client for testnet.

Source

pub fn demo( api_key: impl Into<String>, api_secret: impl Into<String>, ) -> Result<Self>

Create a new client for demo environment.

Source

pub fn config(&self) -> &ClientConfig

Get the client configuration.

Source

pub async fn get_public<T: DeserializeOwned>( &self, endpoint: &str, params: &[(&str, &str)], ) -> Result<T>

Send a public GET request (no authentication).

Source

pub async fn get<T: DeserializeOwned>( &self, endpoint: &str, params: &[(&str, &str)], ) -> Result<T>

Send an authenticated GET request.

Source

pub async fn post<T: DeserializeOwned, B: Serialize>( &self, endpoint: &str, body: &B, ) -> Result<T>

Send an authenticated POST request.

Source§

impl BybitClient

Source

pub async fn get_wallet_balance( &self, account_type: AccountType, ) -> Result<WalletBalance>

Get wallet balance.

§Arguments
  • account_type - Account type (UNIFIED, CONTRACT, etc.)
Source

pub async fn get_account_info(&self) -> Result<AccountInfo>

Get account info.

Source

pub async fn get_fee_rate( &self, category: Category, symbol: Option<&str>, ) -> Result<FeeRates>

Get fee rate.

§Arguments
  • category - Product category
  • symbol - Optional symbol filter
Source

pub async fn get_transaction_log( &self, category: Option<Category>, limit: Option<u32>, ) -> Result<TransactionLogs>

Get transaction log.

§Arguments
  • category - Optional category filter
  • limit - Optional limit (default 20)
Source

pub async fn set_margin_mode(&self, margin_mode: MarginMode) -> Result<Value>

Set margin mode.

§Arguments
  • margin_mode - Margin mode (REGULAR_MARGIN, PORTFOLIO_MARGIN)
Source

pub async fn get_collateral_info( &self, currency: Option<&str>, ) -> Result<CollateralInfo>

Get collateral info.

§Arguments
  • currency - Optional currency filter
Source

pub async fn get_borrow_history( &self, currency: Option<&str>, limit: Option<u32>, ) -> Result<BorrowHistory>

Get borrow history.

§Arguments
  • currency - Optional currency filter
  • limit - Optional limit (default 20)
Source

pub async fn batch_set_collateral( &self, params: BatchSetCollateralParams, ) -> Result<BatchSetCollateralResponse>

Source

pub async fn get_account_instruments( &self, category: Category, symbol: Option<&str>, limit: Option<u32>, cursor: Option<&str>, ) -> Result<GetAccountInstrumentsResponse>

Source

pub async fn get_coin_greeks( &self, base_coin: Option<&str>, ) -> Result<GetCoinGreeksResponse>

Source

pub async fn get_dcp_info(&self) -> Result<GetDcpInfoResponse>

Source

pub async fn get_group_fee_rate( &self, product_type: &str, group_id: Option<&str>, ) -> Result<GetGroupFeeRateResponse>

Source

pub async fn get_mmp_state( &self, base_coin: &str, ) -> Result<GetMmpStateResponse>

Source

pub async fn get_smp_group(&self) -> Result<GetSmpGroupResponse>

Source

pub async fn get_transferable_amount( &self, coin_name: &str, ) -> Result<GetTransferableAmountResponse>

Source

pub async fn get_user_settings(&self) -> Result<GetUserSettingsResponse>

Source

pub async fn manual_borrow( &self, params: ManualBorrowParams, ) -> Result<ManualBorrowResponse>

Source

pub async fn manual_repay( &self, params: ManualRepayParams, ) -> Result<ManualRepayResponse>

Source

pub async fn no_convert_repay( &self, params: NoConvertRepayParams, ) -> Result<NoConvertRepayResponse>

Source

pub async fn one_click_repay( &self, params: OneClickRepayParams, ) -> Result<OneClickRepayResponse>

Source

pub async fn reset_mmp( &self, params: ResetMmpParams, ) -> Result<ResetMmpResponse>

Source

pub async fn set_collateral_coin( &self, params: SetCollateralCoinParams, ) -> Result<Value>

Source

pub async fn set_mmp(&self, params: SetMmpParams) -> Result<SetMmpResponse>

Source

pub async fn set_price_limit( &self, params: SetPriceLimitParams, ) -> Result<SetPriceLimitResponse>

Source

pub async fn set_spot_hedging( &self, params: SetSpotHedgingParams, ) -> Result<SetSpotHedgingResponse>

Source

pub async fn upgrade_to_uta_pro(&self) -> Result<UpgradeToUtaProResponse>

Source§

impl BybitClient

Source

pub async fn get_coin_info( &self, coin: Option<&str>, ) -> Result<CoinInfoResponse>

Get coin info.

§Arguments
  • coin - Optional coin filter
Source

pub async fn internal_transfer( &self, coin: &str, amount: &str, from_account: &str, to_account: &str, ) -> Result<TransferResponse>

Internal transfer between accounts.

§Arguments
  • coin - Coin to transfer
  • amount - Amount to transfer
  • from_account - Source account type
  • to_account - Destination account type
Source

pub async fn get_internal_transfer_list( &self, coin: Option<&str>, limit: Option<u32>, ) -> Result<TransferList>

Get internal transfer list.

§Arguments
  • coin - Optional coin filter
  • limit - Optional limit (default 20)
Source

pub async fn get_deposit_address( &self, coin: &str, chain_type: Option<&str>, ) -> Result<DepositAddressResponse>

Get deposit address.

§Arguments
  • coin - Coin name
  • chain_type - Optional chain type
Source

pub async fn get_deposit_records( &self, coin: Option<&str>, limit: Option<u32>, ) -> Result<DepositRecords>

Get deposit records.

§Arguments
  • coin - Optional coin filter
  • limit - Optional limit (default 50)
Source

pub async fn withdraw(&self, params: WithdrawParams) -> Result<WithdrawResponse>

Withdraw funds (REQUIRES STRICT VALIDATION).

§Arguments
  • params - Withdraw parameters
§Safety

This function validates all parameters before sending to prevent fund loss.

Source

pub async fn cancel_withdraw(&self, withdraw_id: &str) -> Result<Value>

Cancel a pending withdrawal.

§Arguments
  • withdraw_id - Withdraw ID to cancel
Source

pub async fn get_withdraw_records( &self, coin: Option<&str>, limit: Option<u32>, ) -> Result<WithdrawRecords>

Get withdraw records.

§Arguments
  • coin - Optional coin filter
  • limit - Optional limit (default 50)
Source

pub async fn get_withdrawable_amount( &self, coin: &str, ) -> Result<WithdrawableAmount>

Get withdrawable amount.

§Arguments
  • coin - Coin name
Source§

impl BybitClient

Source

pub async fn query_broker_account_info( &self, ) -> Result<QueryBrokerAccountInfoResponse>

Get Broker Account Info.

Source

pub async fn query_broker_all_uid_details( &self, uids: Option<&str>, limit: Option<i64>, cursor: Option<&str>, ) -> Result<QueryBrokerAllUidDetailsResponse>

Query Broker All UID Rate Limits.

Source

pub async fn query_broker_cap(&self) -> Result<QueryBrokerCapResponse>

Query Broker Rate Limit Cap.

Source

pub async fn query_broker_earning( &self, biz_type: Option<&str>, begin: Option<&str>, end: Option<&str>, uid: Option<&str>, limit: Option<i64>, cursor: Option<&str>, ) -> Result<QueryBrokerEarningResponse>

Get Broker Earnings Info.

Source

pub async fn set_broker_api_limit( &self, params: SetBrokerApiLimitParams, ) -> Result<SetBrokerApiLimitResponse>

Set Broker API Rate Limit.

Source

pub async fn distribute_award( &self, params: DistributeAwardParams, ) -> Result<Value>

Distribute voucher.

Source

pub async fn get_award_info( &self, params: GetAwardInfoParams, ) -> Result<GetAwardInfoResponse>

Get voucher details.

Source

pub async fn get_distribution_record( &self, params: GetDistributionRecordParams, ) -> Result<GetDistributionRecordResponse>

Query voucher distribution record.

Source§

impl BybitClient

Source

pub async fn adjust_ltv( &self, params: AdjustLtvParams, ) -> Result<AdjustLtvResponse>

Adjust Collateral (Add or Remove)

Source

pub async fn calculate_max_loan( &self, params: CalculateMaxLoanParams, ) -> Result<CalculateMaxLoanResponse>

Calculate Max Borrowable Amount

Source

pub async fn cancel_fixed_borrow_order( &self, params: CancelFixedBorrowOrderParams, ) -> Result<CancelFixedBorrowOrderResponse>

Cancel Borrow Order

Source

pub async fn create_fixed_borrow( &self, params: CreateFixedBorrowParams, ) -> Result<CreateFixedBorrowResponse>

Create Fixed-Term Borrow Order

Source

pub async fn fully_repay_fixed_loan( &self, params: FullyRepayFixedLoanParams, ) -> Result<FullyRepayFixedLoanResponse>

Fully Repay Loan

Source

pub async fn get_adjustment_history( &self, adjust_id: Option<i64>, collateral_currency: Option<&str>, limit: Option<i64>, cursor: Option<i64>, ) -> Result<GetAdjustmentHistoryResponse>

Get Collateral Adjustment History

Source

pub async fn get_collateral_data( &self, currency: Option<&str>, ) -> Result<GetCollateralDataResponse>

Get Collateral Currency Data

Source

pub async fn get_fixed_repayment_history(&self) -> Result<Value>

Get Repayment History

Source

pub async fn get_fixed_supply_contract_info(&self) -> Result<Value>

Get Supply Contract Info

Source

pub async fn get_fixed_supply_order_info(&self) -> Result<Value>

Get Supply Order Info

Source

pub async fn get_fixed_supply_order_quote( &self, ) -> Result<GetCryptoLoanFixedSupplyOrderQuoteResponse>

Get Supply Market Quotes

Source

pub async fn get_flexible_borrow_history( &self, ) -> Result<GetCryptoLoanFlexibleBorrowHistoryResponse>

Get Flexible Borrow History

Source

pub async fn get_flexible_ongoing_coin(&self) -> Result<Value>

Get Ongoing Flexible Borrow Info

Source

pub async fn get_flexible_repayment_history( &self, ) -> Result<GetCryptoLoanFlexibleRepaymentHistoryResponse>

Get Flexible Repayment History

Source

pub async fn get_fixed_borrow_contract_info( &self, order_id: Option<&str>, loan_id: Option<&str>, order_currency: Option<&str>, term: Option<&str>, limit: Option<i64>, cursor: Option<i64>, ) -> Result<Value>

Get Borrow Contract Info

Source

pub async fn get_fixed_borrow_order_info( &self, order_id: Option<&str>, order_currency: Option<&str>, state: Option<&str>, term: Option<&str>, limit: Option<i64>, cursor: Option<i64>, ) -> Result<Value>

Get Borrow Order Info

Source

pub async fn get_fixed_borrow_order_quote( &self, order_currency: Option<&str>, term: Option<&str>, order_by: Option<&str>, sort: Option<i64>, limit: Option<i64>, ) -> Result<GetFixedBorrowOrderQuoteResponse>

Get Borrow Market Quotes

Source

pub async fn get_fixed_renew_info( &self, order_id: Option<&str>, order_currency: Option<&str>, limit: Option<i64>, cursor: Option<i64>, ) -> Result<Value>

Get Renewal Information

Source

pub async fn get_loan_position(&self) -> Result<GetLoanPositionResponse>

Get Crypto Loan Position

Source

pub async fn get_loanable_data( &self, currency: Option<&str>, vip_level: Option<&str>, ) -> Result<GetLoanableDataResponse>

Get Loanable Currency Data

Source

pub async fn get_max_collateral_amount( &self, currency: &str, ) -> Result<GetMaxCollateralAmountResponse>

Get Max Collateral Redeem Amount

Source

pub async fn repay_fixed_collateral( &self, params: PostCryptoLoanFixedRepayCollateralParams, ) -> Result<PostCryptoLoanFixedRepayCollateralResponse>

Repay with Collateral (Fixed)

Source

pub async fn create_fixed_supply( &self, params: PostCryptoLoanFixedSupplyParams, ) -> Result<Value>

Create Supply Order

Source

pub async fn cancel_fixed_supply_order( &self, params: PostCryptoLoanFixedSupplyOrderCancelParams, ) -> Result<PostCryptoLoanFixedSupplyOrderCancelResponse>

Cancel Supply Order

Source

pub async fn create_flexible_borrow( &self, params: PostCryptoLoanFlexibleBorrowParams, ) -> Result<PostCryptoLoanFlexibleBorrowResponse>

Create Flexible Borrow Order

Source

pub async fn repay_flexible_loan( &self, params: PostCryptoLoanFlexibleRepayParams, ) -> Result<Value>

Repay Flexible Loan

Source

pub async fn repay_flexible_collateral( &self, params: PostCryptoLoanFlexibleRepayCollateralParams, ) -> Result<PostCryptoLoanFlexibleRepayCollateralResponse>

Repay with Collateral (Flexible)

Source

pub async fn renew_fixed_loan( &self, params: RenewFixedLoanParams, ) -> Result<Value>

Renew Loan

Source§

impl BybitClient

Source

pub async fn add_liquidity( &self, params: AddLiquidityParams, ) -> Result<AddLiquidityResponse>

Source

pub async fn add_liquidity_mining_margin(&self, params: Value) -> Result<Value>

Source

pub async fn claim_liquidity_interest( &self, params: ClaimLiquidityInterestParams, ) -> Result<ClaimLiquidityInterestResponse>

Source

pub async fn get_advance_earn_order( &self, category: Category, product_id: Option<i64>, order_id: Option<&str>, order_link_id: Option<&str>, start_time: Option<i64>, end_time: Option<i64>, limit: Option<i64>, cursor: Option<&str>, ) -> Result<GetAdvanceEarnOrderResponse>

Source

pub async fn get_advance_earn_position( &self, category: Category, product_id: Option<i64>, coin: Option<&str>, limit: Option<i64>, cursor: Option<&str>, ) -> Result<GetAdvanceEarnPositionResponse>

Source

pub async fn get_advance_earn_product( &self, category: Category, coin: Option<&str>, duration: Option<&str>, ) -> Result<GetAdvanceEarnProductResponse>

Source

pub async fn get_advance_earn_product_extra_info( &self, category: Category, product_id: Option<i64>, ) -> Result<GetAdvanceEarnProductExtraInfoResponse>

Source

pub async fn get_double_win_leverage( &self, product_id: i64, initial_price: &str, lower_price: &str, upper_price: &str, ) -> Result<GetDoubleWinLeverageResponse>

Source

pub async fn get_earn_apr_history( &self, category: Category, product_id: &str, start_time: i64, end_time: i64, ) -> Result<GetEarnAprHistoryResponse>

Source

pub async fn get_earn_hourly_yield_history( &self, category: Category, product_id: Option<&str>, start_time: Option<i64>, end_time: Option<i64>, limit: Option<i64>, cursor: Option<&str>, ) -> Result<GetEarnHourlyYieldHistoryResponse>

Source

pub async fn get_earn_order_history( &self, category: Category, order_id: Option<&str>, order_link_id: Option<&str>, product_id: Option<&str>, start_time: Option<i64>, end_time: Option<i64>, limit: Option<i64>, cursor: Option<&str>, ) -> Result<GetEarnOrderHistoryResponse>

Source

pub async fn get_earn_position( &self, category: Category, product_id: Option<&str>, coin: Option<&str>, ) -> Result<GetEarnPositionResponse>

Source

pub async fn get_earn_product( &self, category: Category, coin: Option<&str>, ) -> Result<GetEarnProductResponse>

Source

pub async fn get_earn_yield_history( &self, category: Category, product_id: Option<i64>, start_time: Option<i64>, end_time: Option<i64>, limit: Option<i64>, cursor: Option<&str>, ) -> Result<GetEarnYieldHistoryResponse>

Source

pub async fn get_fixed_term_order( &self, order_type: Option<&str>, product_id: Option<&str>, category: Option<Category>, order_id: Option<&str>, start_time: Option<i64>, end_time: Option<i64>, limit: Option<i64>, cursor: Option<&str>, ) -> Result<GetFixedTermOrderResponse>

Source

pub async fn get_fixed_term_position( &self, product_id: Option<&str>, category: Option<Category>, coin: Option<&str>, ) -> Result<GetFixedTermPositionResponse>

Source

pub async fn get_fixed_term_product( &self, coin: Option<&str>, ) -> Result<GetFixedTermProductResponse>

Source

pub async fn get_hold_to_earn_product( &self, ) -> Result<GetHoldToEarnProductResponse>

Source

pub async fn get_hold_to_earn_yield_history( &self, time_start: Option<i64>, time_end: Option<i64>, limit: i64, cursor: Option<&str>, ) -> Result<GetHoldToEarnYieldHistoryResponse>

Source

pub async fn get_liquidity_mining_liquidation_records( &self, base_coin: Option<&str>, quote_coin: Option<&str>, start_time: Option<i64>, end_time: Option<i64>, limit: Option<i64>, cursor: Option<&str>, ) -> Result<GetLiquidityMiningLiquidationRecordsResponse>

Source

pub async fn get_liquidity_mining_orders( &self, order_id: Option<&str>, order_link_id: Option<&str>, product_id: Option<&str>, order_type: Option<&str>, status: Option<&str>, start_time: Option<i64>, end_time: Option<i64>, limit: Option<i64>, cursor: Option<&str>, ) -> Result<GetLiquidityMiningOrdersResponse>

Source

pub async fn get_liquidity_mining_positions( &self, product_id: Option<&str>, base_coin: Option<&str>, ) -> Result<GetLiquidityMiningPositionsResponse>

Source

pub async fn get_liquidity_mining_products( &self, base_coin: Option<&str>, quote_coin: Option<&str>, ) -> Result<GetLiquidityMiningProductsResponse>

Source

pub async fn get_liquidity_mining_yield_records( &self, base_coin: Option<&str>, quote_coin: Option<&str>, start_time: Option<i64>, end_time: Option<i64>, limit: Option<i64>, cursor: Option<&str>, ) -> Result<GetLiquidityMiningYieldRecordsResponse>

Source

pub async fn get_rwa_nav_chart( &self, product_id: i64, start_time: Option<i64>, end_time: Option<i64>, ) -> Result<GetRwaNavChartResponse>

Source

pub async fn get_rwa_order_list( &self, order_id: Option<&str>, order_link_id: Option<&str>, order_type: Option<&str>, product_id: Option<i64>, start_time: Option<i64>, end_time: Option<i64>, limit: Option<i64>, cursor: Option<&str>, ) -> Result<GetRwaOrderListResponse>

Source

pub async fn get_rwa_position_list(&self) -> Result<GetRwaPositionListResponse>

Source

pub async fn get_rwa_product_list( &self, coin: Option<&str>, ) -> Result<GetRwaProductListResponse>

Source

pub async fn get_smart_leverage_redeem_est_amount_list( &self, category: Category, position_ids: &str, ) -> Result<GetSmartLeverageRedeemEstAmountListResponse>

Source

pub async fn get_token_daily_yield( &self, coin: &str, start_time: Option<i64>, end_time: Option<i64>, cursor: Option<&str>, limit: Option<i64>, ) -> Result<GetTokenDailyYieldResponse>

Source

pub async fn get_token_historical_apr( &self, coin: &str, range: i64, ) -> Result<GetTokenHistoricalAprResponse>

Source

pub async fn get_token_hourly_yield( &self, coin: &str, start_time: Option<i64>, end_time: Option<i64>, cursor: Option<&str>, limit: Option<i64>, ) -> Result<GetTokenHourlyYieldResponse>

Source

pub async fn get_token_order_list( &self, coin: &str, order_link_id: Option<&str>, order_id: Option<&str>, order_type: Option<&str>, start_time: Option<i64>, end_time: Option<i64>, cursor: Option<&str>, limit: Option<i64>, ) -> Result<GetTokenOrderListResponse>

Source

pub async fn get_token_position( &self, coin: &str, ) -> Result<GetTokenPositionResponse>

Source

pub async fn get_token_product( &self, coin: &str, ) -> Result<GetTokenProductResponse>

Source

pub async fn list_earn_coupons( &self, category: Category, ) -> Result<ListEarnCouponsResponse>

Source

pub async fn modify_earn_position( &self, params: ModifyEarnPositionParams, ) -> Result<Value>

Source

pub async fn place_advance_earn_order( &self, params: PlaceAdvanceEarnOrderParams, ) -> Result<PlaceAdvanceEarnOrderResponse>

Source

pub async fn place_earn_order( &self, params: PlaceEarnOrderParams, ) -> Result<PlaceEarnOrderResponse>

Source

pub async fn place_fixed_term_order( &self, params: PlaceFixedTermOrderParams, ) -> Result<PlaceFixedTermOrderResponse>

Source

pub async fn place_rwa_order( &self, params: PlaceRwaOrderParams, ) -> Result<PlaceRwaOrderResponse>

Source

pub async fn place_token_order( &self, params: PlaceTokenOrderParams, ) -> Result<PlaceTokenOrderResponse>

Source

pub async fn pwm_asset_trend( &self, plan_id: &str, start_time: Option<i64>, end_time: Option<i64>, ) -> Result<PwmAssetTrendResponse>

Source

pub async fn pwm_claim( &self, params: PwmClaimParams, ) -> Result<PwmClaimResponse>

Source

pub async fn pwm_create_custom_plan( &self, params: PwmCreateCustomPlanParams, ) -> Result<PwmCreateCustomPlanResponse>

Source

pub async fn pwm_fund_nav( &self, fund_id: &str, start_time: Option<i64>, end_time: Option<i64>, ) -> Result<PwmFundNavResponse>

Source

pub async fn pwm_fund_transfer( &self, params: PwmFundTransferParams, ) -> Result<PwmFundTransferResponse>

Source

pub async fn pwm_get_new_plan_detail( &self, plan_id: &str, ) -> Result<PwmGetNewPlanDetailResponse>

Source

pub async fn pwm_get_plan_detail( &self, plan_id: &str, ) -> Result<PwmGetPlanDetailResponse>

Source

pub async fn pwm_inst_create_fund( &self, params: PwmInstCreateFundParams, ) -> Result<PwmInstCreateFundResponse>

Source

pub async fn pwm_inst_create_investment_plan( &self, params: PwmInstCreateInvestmentPlanParams, ) -> Result<PwmInstCreateInvestmentPlanResponse>

Source

pub async fn pwm_inst_create_sub_account( &self, params: PwmInstCreateSubAccountParams, ) -> Result<PwmInstCreateSubAccountResponse>

Source

pub async fn pwm_inst_get_investment_plans( &self, plan_id: Option<&str>, status: Option<&str>, subscription_uid: Option<&str>, limit: Option<i64>, cursor: Option<&str>, ) -> Result<PwmInstGetInvestmentPlansResponse>

Source

pub async fn pwm_inst_list_funds( &self, fund_id: Option<&str>, coin: Option<&str>, status: Option<&str>, limit: Option<i64>, cursor: Option<&str>, ) -> Result<PwmInstListFundsResponse>

Source

pub async fn pwm_inst_list_orders( &self, fund_id: Option<&str>, order_type: Option<&str>, status: Option<&str>, start_time: Option<i64>, end_time: Option<i64>, limit: Option<i64>, cursor: Option<&str>, ) -> Result<PwmInstListOrdersResponse>

Source

pub async fn pwm_inst_manage_investment_plan( &self, params: PwmInstManageInvestmentPlanParams, ) -> Result<PwmInstManageInvestmentPlanResponse>

Source

pub async fn pwm_inst_manage_order( &self, params: PwmInstManageOrderParams, ) -> Result<PwmInstManageOrderResponse>

Source

pub async fn pwm_inst_settle_profit( &self, params: PwmInstSettleProfitParams, ) -> Result<PwmInstSettleProfitResponse>

Source

pub async fn pwm_invest_more( &self, params: PwmInvestMoreParams, ) -> Result<PwmInvestMoreResponse>

Source

pub async fn pwm_list_investment_plans( &self, plan_id: Option<&str>, status: Option<&str>, limit: Option<i64>, cursor: Option<&str>, ) -> Result<PwmListInvestmentPlansResponse>

Source

pub async fn pwm_list_order( &self, plan_id: Option<&str>, category: Option<Category>, order_type: Option<&str>, status: Option<&str>, start_time: Option<i64>, end_time: Option<i64>, limit: Option<i64>, cursor: Option<&str>, order_link_id: Option<&str>, ) -> Result<PwmListOrderResponse>

Source

pub async fn pwm_list_product_cards( &self, ) -> Result<PwmListProductCardsResponse>

Source

pub async fn pwm_query_fund_transfer_result( &self, transfer_id: Option<&str>, from_user_id: Option<i64>, ) -> Result<PwmQueryFundTransferResultResponse>

Source

pub async fn pwm_redeem( &self, params: PwmRedeemParams, ) -> Result<PwmRedeemResponse>

Source

pub async fn pwm_subscribe( &self, params: PwmSubscribeParams, ) -> Result<PwmSubscribeResponse>

Source

pub async fn redeem_fixed_term( &self, params: RedeemFixedTermParams, ) -> Result<RedeemFixedTermResponse>

Source

pub async fn reinvest_liquidity( &self, params: ReinvestLiquidityParams, ) -> Result<Value>

Source

pub async fn remove_liquidity( &self, params: RemoveLiquidityParams, ) -> Result<Value>

Source

pub async fn set_fixed_term_auto_invest( &self, params: SetFixedTermAutoInvestParams, ) -> Result<Value>

Source§

impl BybitClient

Source

pub async fn apply_quote( &self, params: ApplyQuoteParams, ) -> Result<ApplyQuoteResponse>

Request a Quote.

Source

pub async fn confirm_quote( &self, params: ConfirmQuoteParams, ) -> Result<ConfirmQuoteResponse>

Confirm Quote and Execute Trade.

Source

pub async fn get_p2p_personal_info(&self) -> Result<Value>

Get Account Information.

Source

pub async fn get_ads(&self, params: GetAdsParams) -> Result<GetAdsResponse>

Get Ads.

Source

pub async fn get_all_orders(&self, params: Value) -> Result<Value>

Get All Orders.

Source

pub async fn get_chat_messages( &self, params: GetChatMessagesParams, ) -> Result<GetChatMessagesResponse>

Get Chat Message.

Source

pub async fn get_coin_balance( &self, account_type: AccountType, member_id: Option<&str>, coin: Option<&str>, with_bonus: Option<i64>, ) -> Result<GetCoinBalanceResponse>

Get Coin Balance.

Source

pub async fn get_counterparty_user_info( &self, params: GetCounterpartyUserInfoParams, ) -> Result<GetCounterpartyUserInfoResponse>

Get Counterparty User Info.

Source

pub async fn get_my_ad_details( &self, params: GetMyAdDetailsParams, ) -> Result<GetMyAdDetailsResponse>

Get My Ad Details.

Source

pub async fn get_my_ads( &self, params: GetMyAdsParams, ) -> Result<GetMyAdsResponse>

Get My Ads.

Source

pub async fn get_order_detail( &self, params: GetOrderDetailParams, ) -> Result<GetOrderDetailResponse>

Get Order Detail.

Source

pub async fn get_pending_orders( &self, params: GetPendingOrdersParams, ) -> Result<GetPendingOrdersResponse>

Get Pending Orders.

Source

pub async fn get_reference_price( &self, symbol: &str, payment_method: Option<&str>, ) -> Result<GetReferencePriceResponse>

Get Reference Price.

Source

pub async fn get_user_payment(&self) -> Result<GetUserPaymentResponse>

Get User Payment.

Source

pub async fn mark_order_as_paid( &self, params: MarkOrderAsPaidParams, ) -> Result<MarkOrderAsPaidResponse>

Mark Order as Paid.

Source

pub async fn post_ad(&self, params: PostAdParams) -> Result<PostAdResponse>

Post Ad.

Source

pub async fn query_balance( &self, account_category: Option<&str>, currency: Option<&str>, ) -> Result<QueryBalanceResponse>

Query Account Balance.

Source

pub async fn query_coin_list( &self, side: Option<i64>, ) -> Result<QueryCoinListResponse>

Get Trading Pairs.

Source

pub async fn query_funding_detail_api( &self, create_time_from: Option<&str>, create_time_to: Option<&str>, limit: Option<&str>, cursor: Option<&str>, ) -> Result<QueryFundingDetailApiResponse>

Get Funding History.

Source

pub async fn query_trade( &self, trade_no: Option<&str>, merchant_request_id: Option<&str>, ) -> Result<QueryTradeResponse>

Query Trade Status.

Source

pub async fn query_trade_history( &self, index: Option<i64>, limit: Option<i64>, start_time: Option<&str>, end_time: Option<&str>, ) -> Result<QueryTradeHistoryResponse>

Query Trade History.

Source

pub async fn release_assets(&self, params: ReleaseAssetsParams) -> Result<Value>

Release Assets.

Source

pub async fn remove_ad(&self, params: RemoveAdParams) -> Result<Value>

Remove Ad.

Source

pub async fn send_chat_message( &self, params: SendChatMessageParams, ) -> Result<Value>

Send Chat Message.

Source

pub async fn update_ad( &self, params: UpdateAdParams, ) -> Result<UpdateAdResponse>

Update / Relist Ad.

Source

pub async fn upload_chat_file( &self, params: UploadChatFileParams, ) -> Result<UploadChatFileResponse>

Upload Chat File.

Source§

impl BybitClient

Source

pub async fn create_f_mart_bot( &self, params: CreateFMartBotParams, ) -> Result<CreateFMartBotResponse>

Create a new futures Martingale bot with DCA averaging strategy.

Source§

impl BybitClient

Source

pub async fn get_server_time(&self) -> Result<ServerTime>

Get server time.

§Example
let client = BybitClient::testnet("key", "secret")?;
let time = client.get_server_time().await?;
println!("Server time: {}", time.time_second);
Source

pub async fn get_instruments_info( &self, category: Category, symbol: Option<&str>, ) -> Result<InstrumentsInfo>

Get instruments info.

§Arguments
  • category - Product category
  • symbol - Optional symbol filter
§Example
let client = BybitClient::testnet("key", "secret")?;
let info = client.get_instruments_info(Category::Linear, Some("BTCUSDT")).await?;
Source

pub async fn get_orderbook( &self, category: Category, symbol: &str, limit: Option<u32>, ) -> Result<Orderbook>

Get orderbook.

§Arguments
  • category - Product category
  • symbol - Symbol name
  • limit - Optional depth limit (1-500, default 25)
Source

pub async fn get_tickers( &self, category: Category, symbol: Option<&str>, ) -> Result<Tickers>

Get tickers.

§Arguments
  • category - Product category
  • symbol - Optional symbol filter (returns all if None)
Source

pub async fn get_klines( &self, category: Category, symbol: &str, interval: Interval, limit: Option<u32>, ) -> Result<Klines>

Get klines (candlestick data).

§Arguments
  • category - Product category
  • symbol - Symbol name
  • interval - Kline interval
  • limit - Optional limit (1-1000, default 200)
Source

pub async fn get_funding_history( &self, category: Category, symbol: &str, limit: Option<u32>, ) -> Result<FundingHistory>

Get funding rate history.

§Arguments
  • category - Product category (linear or inverse)
  • symbol - Symbol name
  • limit - Optional limit (default 200)
Source

pub async fn get_recent_trades( &self, category: Category, symbol: &str, limit: Option<u32>, ) -> Result<RecentTrades>

Get recent trades.

§Arguments
  • category - Product category
  • symbol - Symbol name
  • limit - Optional limit (1-1000, default 500)
Source

pub async fn get_open_interest( &self, category: Category, symbol: &str, interval_time: &str, limit: Option<u32>, ) -> Result<OpenInterest>

Get open interest.

§Arguments
  • category - Product category (linear or inverse)
  • symbol - Symbol name
  • interval_time - Interval (5min, 15min, 30min, 1h, 4h, 1d)
  • limit - Optional limit (default 50)
Source

pub async fn get_risk_limit( &self, category: Category, symbol: Option<&str>, ) -> Result<RiskLimits>

Get risk limit info.

§Arguments
  • category - Product category (linear or inverse)
  • symbol - Optional symbol filter
Source

pub async fn get_mark_price_kline( &self, category: Category, symbol: &str, interval: Interval, limit: Option<u32>, ) -> Result<Klines>

Get mark price kline.

Source

pub async fn get_index_price_kline( &self, category: Category, symbol: &str, interval: Interval, limit: Option<u32>, ) -> Result<Klines>

Get index price kline.

Source

pub async fn get_premium_index_price_kline( &self, category: Category, symbol: &str, interval: Interval, limit: Option<u32>, ) -> Result<Klines>

Get premium index price kline.

Source

pub async fn get_adl_alert( &self, symbol: Option<&str>, ) -> Result<GetAdlAlertResponse>

Source

pub async fn get_delivery_price( &self, category: Category, symbol: Option<&str>, base_coin: Option<&str>, settle_coin: Option<&str>, limit: Option<u32>, cursor: Option<&str>, ) -> Result<GetDeliveryPriceResponse>

Source

pub async fn get_historical_volatility( &self, category: Category, base_coin: Option<&str>, quote_coin: Option<&str>, period: Option<u32>, start_time: Option<u64>, end_time: Option<u64>, ) -> Result<GetHistoricalVolatilityResponse>

Source

pub async fn get_index_price_components( &self, index_name: &str, ) -> Result<GetIndexPriceComponentsResponse>

Source

pub async fn get_insurance_pool( &self, coin: Option<&str>, ) -> Result<GetInsurancePoolResponse>

Source

pub async fn get_long_short_ratio( &self, category: Category, symbol: &str, period: &str, start_time: Option<&str>, end_time: Option<&str>, limit: Option<u32>, cursor: Option<&str>, ) -> Result<GetLongShortRatioResponse>

Source

pub async fn get_new_delivery_price( &self, category: Category, base_coin: &str, settle_coin: Option<&str>, ) -> Result<GetNewDeliveryPriceResponse>

Source

pub async fn get_order_price_limit( &self, category: Option<Category>, symbol: &str, ) -> Result<GetOrderPriceLimitResponse>

Source

pub async fn get_rpi_orderbook( &self, category: Option<Category>, symbol: &str, limit: u32, ) -> Result<GetRpiOrderbookResponse>

Source§

impl BybitClient

Source

pub async fn get_positions( &self, category: Category, symbol: Option<&str>, settle_coin: Option<&str>, ) -> Result<PositionList>

Get position list.

§Arguments
  • category - Product category
  • symbol - Optional symbol filter
  • settle_coin - Optional settle coin filter (e.g., “USDT”)
Source

pub async fn set_leverage( &self, category: Category, symbol: &str, buy_leverage: &str, sell_leverage: &str, ) -> Result<Value>

Set leverage.

§Arguments
  • category - Product category
  • symbol - Symbol name
  • buy_leverage - Buy leverage
  • sell_leverage - Sell leverage
Source

pub async fn set_trading_stop(&self, params: TradingStopParams) -> Result<Value>

Set trading stop (TP/SL).

§Arguments
  • params - Trading stop parameters
Source

pub async fn switch_position_mode( &self, category: Category, mode: PositionMode, ) -> Result<Value>

Switch position mode.

§Arguments
  • category - Product category
  • mode - Position mode (0=merged, 3=both sides)
Source

pub async fn set_risk_limit( &self, category: Category, symbol: &str, risk_id: i32, ) -> Result<Value>

Set risk limit.

§Arguments
  • category - Product category
  • symbol - Symbol name
  • risk_id - Risk limit ID
Source

pub async fn add_margin( &self, category: Category, symbol: &str, margin: &str, ) -> Result<Value>

Add or reduce margin.

§Arguments
  • category - Product category
  • symbol - Symbol name
  • margin - Margin amount (positive to add, negative to reduce)
Source

pub async fn get_closed_pnl( &self, category: Category, symbol: Option<&str>, limit: Option<u32>, ) -> Result<ClosedPnlList>

Get closed PnL history.

§Arguments
  • category - Product category
  • symbol - Optional symbol filter
  • limit - Optional limit (default 20)
Source

pub async fn get_executions( &self, category: Category, symbol: Option<&str>, limit: Option<u32>, ) -> Result<ExecutionList>

Get execution list (trade history).

§Arguments
  • category - Product category
  • symbol - Optional symbol filter
  • limit - Optional limit (default 50)
Source

pub async fn confirm_new_risk_limit( &self, params: ConfirmNewRiskLimitParams, ) -> Result<ConfirmNewRiskLimitResponse>

Source

pub async fn get_close_position( &self, category: Category, symbol: Option<&str>, start_time: Option<i64>, end_time: Option<i64>, limit: Option<i64>, cursor: Option<&str>, ) -> Result<GetClosePositionResponse>

Source

pub async fn get_move_position_history( &self, category: Option<Category>, symbol: Option<&str>, start_time: Option<i64>, end_time: Option<i64>, status: Option<&str>, block_trade_id: Option<&str>, limit: Option<&str>, cursor: Option<&str>, ) -> Result<GetMovePositionHistoryResponse>

Source

pub async fn move_position( &self, params: MovePositionParams, ) -> Result<MovePositionResponse>

Source

pub async fn set_auto_add_margin( &self, params: SetAutoAddMarginParams, ) -> Result<SetAutoAddMarginResponse>

Source§

impl BybitClient

Source

pub async fn accept_non_lp_quote( &self, params: AcceptNonLpQuoteParams, ) -> Result<AcceptNonLpQuoteResponse>

Accept Non-LP Quote.

Source

pub async fn cancel_all_quotes( &self, params: CancelAllQuotesParams, ) -> Result<CancelAllQuotesResponse>

Cancel All Quotes.

Source

pub async fn cancel_all_rfqs( &self, params: CancelAllRfqsParams, ) -> Result<CancelAllRfqsResponse>

Cancel All RFQs.

Source

pub async fn cancel_quote( &self, params: CancelQuoteParams, ) -> Result<CancelQuoteResponse>

Cancel Quote.

Source

pub async fn cancel_rfq( &self, params: CancelRfqParams, ) -> Result<CancelRfqResponse>

Cancel RFQ.

Source

pub async fn create_quote( &self, params: CreateQuoteParams, ) -> Result<CreateQuoteResponse>

Create Quote.

Source

pub async fn create_rfq( &self, params: CreateRfqParams, ) -> Result<CreateRfqResponse>

Create RFQ.

Source

pub async fn execute_quote( &self, params: ExecuteQuoteParams, ) -> Result<ExecuteQuoteResponse>

Execute Quote.

Source

pub async fn get_public_trades( &self, start_time: Option<i64>, end_time: Option<i64>, limit: Option<u32>, cursor: Option<&str>, ) -> Result<GetPublicTradesResponse>

Get Public Trades.

Source

pub async fn get_quotes(&self, p: GetQuotesParams) -> Result<GetQuotesResponse>

Get Quotes.

§Example
let client = BybitClient::testnet("k", "s")?;
let quotes = client.get_quotes(GetQuotesParams {
    rfq_id: Some("xxx".into()),
    limit: Some(20),
    ..Default::default()
}).await?;
Source

pub async fn get_quotes_realtime( &self, rfq_id: Option<&str>, quote_id: Option<&str>, quote_link_id: Option<&str>, trader_type: Option<&str>, ) -> Result<GetQuotesRealtimeResponse>

Get Quotes Realtime.

Source

pub async fn get_rfq_config(&self) -> Result<GetRfqConfigResponse>

Get RFQ Config.

Source

pub async fn get_rfqs( &self, rfq_id: Option<&str>, rfq_link_id: Option<&str>, trader_type: Option<&str>, status: Option<&str>, limit: Option<u32>, cursor: Option<&str>, ) -> Result<GetRfqsResponse>

Get RFQs.

Source

pub async fn get_rfqs_realtime( &self, rfq_id: Option<&str>, rfq_link_id: Option<&str>, trader_type: Option<&str>, ) -> Result<GetRfqsRealtimeResponse>

Get RFQs Realtime.

Source

pub async fn get_trade_history( &self, p: GetTradeHistoryParams, ) -> Result<GetTradeHistoryResponse>

Get Trade History.

Source§

impl BybitClient

Source

pub async fn get_historical_interest_rate( &self, currency: &str, vip_level: Option<&str>, start_time: Option<i64>, end_time: Option<i64>, ) -> Result<GetHistoricalInterestRateResponse>

Get Historical Interest Rate.

Source

pub async fn get_position_tiers( &self, currency: Option<&str>, ) -> Result<GetPositionTiersResponse>

Get Position Tiers.

Source

pub async fn get_tiered_collateral_ratio( &self, currency: Option<&str>, ) -> Result<GetTieredCollateralRatioResponse>

Get Tiered Collateral Ratio.

Source

pub async fn get_vip_margin_data( &self, vip_level: Option<&str>, currency: Option<&str>, ) -> Result<GetVipMarginDataResponse>

Get VIP Margin Data.

Source§

impl BybitClient

Source

pub async fn place_order( &self, params: PlaceOrderParams, ) -> Result<OrderResponse>

Place an order.

§Arguments
  • params - Order parameters
§Example
let client = BybitClient::testnet("key", "secret")?;
let params = PlaceOrderParams::market(Category::Linear, "BTCUSDT", Side::Buy, "0.01");
let result = client.place_order(params).await?;
println!("Order ID: {}", result.order_id);
Source

pub async fn amend_order( &self, params: AmendOrderParams, ) -> Result<OrderResponse>

Amend an existing order.

Source

pub async fn cancel_order( &self, params: CancelOrderParams, ) -> Result<OrderResponse>

Cancel an order.

Source

pub async fn cancel_all_orders( &self, category: Category, symbol: Option<&str>, ) -> Result<CancelAllResponse>

Cancel all orders.

§Arguments
  • category - Product category
  • symbol - Optional symbol filter (cancel all if None)
Source

pub async fn place_batch_order( &self, category: Category, orders: Vec<PlaceOrderParams>, ) -> Result<BatchOrderResponse>

Place batch orders (up to 10 orders).

§Arguments
  • category - Product category
  • orders - List of orders to place
Source

pub async fn amend_batch_order( &self, category: Category, orders: Vec<AmendOrderParams>, ) -> Result<BatchOrderResponse>

Amend batch orders.

Source

pub async fn cancel_batch_order( &self, category: Category, orders: Vec<CancelOrderParams>, ) -> Result<BatchOrderResponse>

Cancel batch orders.

Source

pub async fn get_open_orders( &self, category: Category, symbol: Option<&str>, ) -> Result<OrdersList>

Get open orders (realtime).

§Arguments
  • category - Product category
  • symbol - Optional symbol filter
Source

pub async fn get_order_history( &self, category: Category, symbol: Option<&str>, limit: Option<u32>, ) -> Result<OrdersList>

Get order history.

§Arguments
  • category - Product category
  • symbol - Optional symbol filter
  • limit - Optional limit (default 20)
Source

pub async fn dcp_set_timewindow( &self, params: DcpSetTimewindowParams, ) -> Result<DcpSetTimewindowResponse>

Source

pub async fn get_spot_borrow_quota( &self, category: Category, symbol: &str, side: Side, ) -> Result<GetSpotBorrowQuotaResponse>

Source

pub async fn pre_check_order( &self, params: PreCheckOrderParams, ) -> Result<PreCheckOrderResponse>

Source§

impl BybitClient

Source

pub async fn get_affiliate_sub_list( &self, cursor: Option<&str>, size: Option<i64>, start_date: Option<&str>, end_date: Option<&str>, sub_aff_id: Option<i64>, ) -> Result<GetAffiliateSubListResponse>

Get affiliate sub-affiliate list.

Source

pub async fn get_affiliate_user_info( &self, uid: &str, ) -> Result<GetAffiliateUserInfoResponse>

Get single direct client user info.

Source

pub async fn get_affiliate_user_list( &self, cursor: Option<&str>, size: Option<i64>, need_deposit: Option<bool>, need30: Option<bool>, need365: Option<bool>, start_date: Option<&str>, end_date: Option<&str>, ) -> Result<GetAffiliateUserListResponse>

Get affiliate user list.

Source

pub async fn create_sub_api_key( &self, params: CreateSubApiKeyParams, ) -> Result<CreateSubApiKeyResponse>

Create Sub API Key.

Source

pub async fn create_sub_member( &self, params: CreateSubMemberParams, ) -> Result<CreateSubMemberResponse>

Create Sub UID.

Source

pub async fn delete_api_key( &self, params: DeleteApiKeyParams, ) -> Result<DeleteApiKeyResponse>

Delete Master API Key.

Source

pub async fn delete_sub_api_key( &self, params: DeleteSubApiKeyParams, ) -> Result<DeleteSubApiKeyResponse>

Delete Sub-account API Key.

Source

pub async fn delete_sub_member_v5( &self, params: DeleteSubMemberV5Params, ) -> Result<DeleteSubMemberV5Response>

Delete Sub-account.

Source

pub async fn frozen_sub_member( &self, params: FrozenSubMemberParams, ) -> Result<FrozenSubMemberResponse>

Freeze/Unfreeze Sub UID.

Source

pub async fn get_member_account_type( &self, member_ids: Option<&str>, ) -> Result<Value>

Get Member Account Type.

Source

pub async fn list_sub_api_keys_v5( &self, sub_member_id: i64, limit: Option<i64>, cursor: Option<&str>, ) -> Result<ListSubApiKeysV5Response>

List Sub-account API Keys.

See: https://bybit-exchange.github.io/docs/v5/user/list-sub-apikeys

Source

pub async fn query_api_key(&self) -> Result<QueryApiKeyResponse>

Get API Key Information.

Source

pub async fn query_escrow_sub_members_v5( &self, next_cursor: Option<i64>, page_size: Option<i64>, ) -> Result<QueryEscrowSubMembersV5Response>

Query Escrow Sub-accounts (Fund Management).

Source

pub async fn query_referrals( &self, cursor: Option<&str>, size: Option<i64>, status: Option<&str>, ) -> Result<QueryReferralsResponse>

Query Referrals.

Source

pub async fn query_sub_members(&self) -> Result<QuerySubMembersResponse>

Query Sub UID List.

Source

pub async fn query_sub_members_v5( &self, page_size: Option<i64>, next_cursor: Option<i64>, ) -> Result<QuerySubMembersV5Response>

Query Sub-accounts List.

Source

pub async fn sign_agreement( &self, params: SignAgreementParams, ) -> Result<SignAgreementResponse>

Sign Agreement.

Source

pub async fn update_api_key( &self, params: UpdateApiKeyParams, ) -> Result<UpdateApiKeyResponse>

Modify Master API Key.

Source

pub async fn update_sub_api_key( &self, params: UpdateSubApiKeyParams, ) -> Result<UpdateSubApiKeyResponse>

Modify Sub-account API Key.

Trait Implementations§

Source§

impl Clone for BybitClient

Source§

fn clone(&self) -> BybitClient

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BybitClient

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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