pub struct HypercallClient { /* private fields */ }Expand description
HTTP API client for Hypercall.
Implementations§
Source§impl HypercallClient
impl HypercallClient
Sourcepub async fn create_account(
&self,
manager: &HypercallWallet,
params: CreateAccountParams,
) -> Result<CreateAccountResult>
pub async fn create_account( &self, manager: &HypercallWallet, params: CreateAccountParams, ) -> Result<CreateAccountResult>
Deploy and register a managed Account.sol through Factory.
This call is not idempotent. Reusing a manager and salt after the corresponding account exists causes the Factory transaction to revert.
Source§impl HypercallClient
impl HypercallClient
Sourcepub const MAX_BULK_CHUNK_SIZE: usize = 50
pub const MAX_BULK_CHUNK_SIZE: usize = 50
Maximum orders per bulk request.
Sourcepub fn new(base_url: impl Into<String>) -> Self
pub fn new(base_url: impl Into<String>) -> Self
Create a new API client. Requests time out after 30 seconds.
Sourcepub fn with_timeout(base_url: impl Into<String>, timeout: Duration) -> Self
pub fn with_timeout(base_url: impl Into<String>, timeout: Duration) -> Self
Create an API client whose requests time out after timeout. A
mutation that times out has an unknown outcome; with the rfq-v2
feature, RFQ V2 reports it as ClientError::RfqV2SubmissionAmbiguous
for reconciliation.
Sourcepub async fn raw_post(&self, path: &str, body: &Value) -> Result<Response>
pub async fn raw_post(&self, path: &str, body: &Value) -> Result<Response>
Send a raw POST request to a path with a JSON body.
Sourcepub async fn health_check(&self) -> Result<()>
pub async fn health_check(&self) -> Result<()>
Check API health.
Sourcepub async fn health_check_with_timeout(&self, timeout: Duration) -> Result<()>
pub async fn health_check_with_timeout(&self, timeout: Duration) -> Result<()>
Check API health using a custom request timeout.
Sourcepub async fn ready_check(&self) -> Result<()>
pub async fn ready_check(&self) -> Result<()>
Check API readiness.
Sourcepub async fn ready_check_with_timeout(&self, timeout: Duration) -> Result<()>
pub async fn ready_check_with_timeout(&self, timeout: Duration) -> Result<()>
Check API readiness using a custom request timeout.
Sourcepub async fn get_exchange_info(&self) -> Result<ExchangeInfoResponse>
pub async fn get_exchange_info(&self) -> Result<ExchangeInfoResponse>
Get the public exchange configuration used for funding and signing.
Sourcepub async fn get_instrument_specs(
&self,
currency: &str,
) -> Result<Vec<InstrumentSpecResponse>>
pub async fn get_instrument_specs( &self, currency: &str, ) -> Result<Vec<InstrumentSpecResponse>>
Get canonical instrument specifications for a currency.
Sourcepub async fn get_markets(&self) -> Result<Vec<Market>>
pub async fn get_markets(&self) -> Result<Vec<Market>>
Get all markets.
Sourcepub async fn place_order<P, Q>(
&self,
wallet: &HypercallWallet,
symbol: &str,
side: Side,
price: P,
size: Q,
tif: TimeInForce,
) -> Result<OrderMessage>where
P: OrderDecimalInput,
Q: OrderDecimalInput,
pub async fn place_order<P, Q>(
&self,
wallet: &HypercallWallet,
symbol: &str,
side: Side,
price: P,
size: Q,
tif: TimeInForce,
) -> Result<OrderMessage>where
P: OrderDecimalInput,
Q: OrderDecimalInput,
Place an order.
Sourcepub async fn place_order_with_nonce(
&self,
wallet: &HypercallWallet,
nonce: u64,
order: BulkOrderParams<'_>,
) -> Result<OrderMessage>
pub async fn place_order_with_nonce( &self, wallet: &HypercallWallet, nonce: u64, order: BulkOrderParams<'_>, ) -> Result<OrderMessage>
Place an order with an explicit nonce. Use this when you need to control
the nonce directly (e.g., retrying with a known nonce, or testing replay
protection). For normal usage, prefer place_order() which auto-increments.
Sourcepub async fn place_order_for_wallet(
&self,
signer: &HypercallWallet,
account: AccountAddress,
order: BulkOrderParams<'_>,
) -> Result<OrderMessage>
pub async fn place_order_for_wallet( &self, signer: &HypercallWallet, account: AccountAddress, order: BulkOrderParams<'_>, ) -> Result<OrderMessage>
Place an order for a managed wallet/account with an explicit signer.
Sourcepub async fn place_order_for_wallet_with_nonce(
&self,
signer: &HypercallWallet,
account: AccountAddress,
nonce: u64,
order: BulkOrderParams<'_>,
) -> Result<OrderMessage>
pub async fn place_order_for_wallet_with_nonce( &self, signer: &HypercallWallet, account: AccountAddress, nonce: u64, order: BulkOrderParams<'_>, ) -> Result<OrderMessage>
Place an order for a managed wallet/account with an explicit nonce.
pub async fn place_order_with_params<S>(
&self,
signer: &S,
params: PlaceOrderParams<'_>,
) -> Result<OrderMessage>where
S: HypercallSigner + ?Sized,
Sourcepub async fn cancel_order<S>(&self, wallet: &S, order_id: u64) -> Result<Value>where
S: HypercallSigner + ?Sized,
pub async fn cancel_order<S>(&self, wallet: &S, order_id: u64) -> Result<Value>where
S: HypercallSigner + ?Sized,
Cancel an order.
Sourcepub async fn cancel_order_for_wallet<S>(
&self,
signer: &S,
account: AccountAddress,
order_id: u64,
) -> Result<Value>where
S: HypercallSigner + ?Sized,
pub async fn cancel_order_for_wallet<S>(
&self,
signer: &S,
account: AccountAddress,
order_id: u64,
) -> Result<Value>where
S: HypercallSigner + ?Sized,
Cancel an order for a managed wallet/account with an explicit signer.
Sourcepub async fn cancel_order_for_wallet_with_nonce<S>(
&self,
signer: &S,
account: AccountAddress,
order_id: u64,
nonce: u64,
) -> Result<Value>where
S: HypercallSigner + ?Sized,
pub async fn cancel_order_for_wallet_with_nonce<S>(
&self,
signer: &S,
account: AccountAddress,
order_id: u64,
nonce: u64,
) -> Result<Value>where
S: HypercallSigner + ?Sized,
Cancel an order for a managed wallet/account with an explicit nonce.
Sourcepub async fn replace_order_with_params<S>(
&self,
signer: &S,
params: ReplaceOrderParams<'_>,
) -> Result<OrderMessage>where
S: HypercallSigner + ?Sized,
pub async fn replace_order_with_params<S>(
&self,
signer: &S,
params: ReplaceOrderParams<'_>,
) -> Result<OrderMessage>where
S: HypercallSigner + ?Sized,
Atomically cancel an order and place a new one.
Sourcepub async fn bulk_place_orders<S, P, Q>(
&self,
wallet: &S,
orders: Vec<(&str, Side, P, Q, TimeInForce)>,
) -> Result<BulkPlaceOrderResponse>
pub async fn bulk_place_orders<S, P, Q>( &self, wallet: &S, orders: Vec<(&str, Side, P, Q, TimeInForce)>, ) -> Result<BulkPlaceOrderResponse>
Place multiple orders in bulk, automatically chunking to stay within API limits.
pub async fn bulk_place_orders_with_params<S>(
&self,
wallet: &S,
orders: Vec<BulkOrderParams<'_>>,
) -> Result<BulkPlaceOrderResponse>where
S: HypercallSigner + ?Sized,
Sourcepub async fn bulk_cancel_orders<S>(
&self,
wallet: &S,
order_ids: Vec<u64>,
) -> Result<BulkCancelOrderResponse>where
S: HypercallSigner + ?Sized,
pub async fn bulk_cancel_orders<S>(
&self,
wallet: &S,
order_ids: Vec<u64>,
) -> Result<BulkCancelOrderResponse>where
S: HypercallSigner + ?Sized,
Cancel multiple orders in bulk, automatically chunking to stay within API limits.
Sourcepub async fn bulk_cancel_orders_for_wallet<S>(
&self,
signer: &S,
account: AccountAddress,
order_ids: Vec<u64>,
) -> Result<BulkCancelOrderResponse>where
S: HypercallSigner + ?Sized,
pub async fn bulk_cancel_orders_for_wallet<S>(
&self,
signer: &S,
account: AccountAddress,
order_ids: Vec<u64>,
) -> Result<BulkCancelOrderResponse>where
S: HypercallSigner + ?Sized,
Cancel multiple orders for a managed wallet/account, automatically chunking.
Sourcepub async fn bulk_replace_orders<S, P, Q>(
&self,
wallet: &S,
replacements: Vec<(u64, &str, Side, P, Q, TimeInForce)>,
) -> Result<BulkPlaceOrderResponse>
pub async fn bulk_replace_orders<S, P, Q>( &self, wallet: &S, replacements: Vec<(u64, &str, Side, P, Q, TimeInForce)>, ) -> Result<BulkPlaceOrderResponse>
Replace multiple orders in bulk, automatically chunking to stay within API limits.
Each tuple is (cancel_order_id, symbol, side, price, size, tif).
pub async fn bulk_replace_orders_with_params<S>(
&self,
wallet: &S,
replacements: Vec<BulkReplaceOrderParams<'_>>,
) -> Result<BulkPlaceOrderResponse>where
S: HypercallSigner + ?Sized,
Sourcepub async fn get_orders(
&self,
wallet: impl Into<AccountAddress>,
status: Option<&str>,
) -> Result<Value>
pub async fn get_orders( &self, wallet: impl Into<AccountAddress>, status: Option<&str>, ) -> Result<Value>
Get orders for a wallet (single page).
Sourcepub async fn get_orders_typed(
&self,
wallet: impl Into<AccountAddress>,
status: Option<&str>,
limit: Option<usize>,
offset: Option<usize>,
) -> Result<OrdersApiResponse>
pub async fn get_orders_typed( &self, wallet: impl Into<AccountAddress>, status: Option<&str>, limit: Option<usize>, offset: Option<usize>, ) -> Result<OrdersApiResponse>
Get one typed page of option and perp orders.
Sourcepub async fn get_username(
&self,
wallet: impl Into<AccountAddress>,
) -> Result<Option<String>>
pub async fn get_username( &self, wallet: impl Into<AccountAddress>, ) -> Result<Option<String>>
Get the display username for a wallet.
Sourcepub async fn get_all_orders(
&self,
wallet: impl Into<AccountAddress>,
status: Option<&str>,
) -> Result<Vec<Value>>
pub async fn get_all_orders( &self, wallet: impl Into<AccountAddress>, status: Option<&str>, ) -> Result<Vec<Value>>
Get ALL orders for a wallet, paginating through all pages.
Sourcepub async fn get_all_orders_typed(
&self,
wallet: impl Into<AccountAddress>,
status: Option<&str>,
) -> Result<Vec<Order>>
pub async fn get_all_orders_typed( &self, wallet: impl Into<AccountAddress>, status: Option<&str>, ) -> Result<Vec<Order>>
Get all option and perp orders as canonical typed rows.
Sourcepub async fn get_fills(
&self,
wallet: impl Into<AccountAddress>,
limit: Option<usize>,
offset: Option<usize>,
) -> Result<Value>
pub async fn get_fills( &self, wallet: impl Into<AccountAddress>, limit: Option<usize>, offset: Option<usize>, ) -> Result<Value>
Get fills for a wallet.
Sourcepub async fn get_fills_typed(
&self,
wallet: impl Into<AccountAddress>,
limit: Option<usize>,
offset: Option<usize>,
) -> Result<FillsResponse>
pub async fn get_fills_typed( &self, wallet: impl Into<AccountAddress>, limit: Option<usize>, offset: Option<usize>, ) -> Result<FillsResponse>
Get a typed page of option and perp fills.
Sourcepub async fn get_portfolio(
&self,
wallet: impl Into<AccountAddress>,
) -> Result<PortfolioResponse>
pub async fn get_portfolio( &self, wallet: impl Into<AccountAddress>, ) -> Result<PortfolioResponse>
Get portfolio for a wallet.
Sourcepub async fn get_portfolio_snapshot(
&self,
wallet: impl Into<AccountAddress>,
) -> Result<Portfolio>
pub async fn get_portfolio_snapshot( &self, wallet: impl Into<AccountAddress>, ) -> Result<Portfolio>
Get the canonical portfolio-margin-compatible snapshot.
Sourcepub async fn get_public_liquidations(
&self,
query: &PublicLiquidationsQuery,
) -> Result<PublicLiquidationsResponse>
pub async fn get_public_liquidations( &self, query: &PublicLiquidationsQuery, ) -> Result<PublicLiquidationsResponse>
Get global public liquidation history.
Sourcepub async fn get_liquidation_status(
&self,
wallet: impl Into<AccountAddress>,
) -> Result<Option<LiquidationStatusData>>
pub async fn get_liquidation_status( &self, wallet: impl Into<AccountAddress>, ) -> Result<Option<LiquidationStatusData>>
Get liquidation status for a wallet.
Sourcepub async fn get_historical_pnl(
&self,
wallet: impl Into<AccountAddress>,
interval: HistoricalPnlInterval,
limit: Option<usize>,
include_attribution: Option<bool>,
) -> Result<HistoricalPnlResponse>
pub async fn get_historical_pnl( &self, wallet: impl Into<AccountAddress>, interval: HistoricalPnlInterval, limit: Option<usize>, include_attribution: Option<bool>, ) -> Result<HistoricalPnlResponse>
Get historical equity snapshots for a wallet.
include_attribution: pass Some(true) only when rendering the
per-symbol breakdown. The default response omits attribution because it
is substantially larger than the equity-only time series.
Sourcepub async fn get_historical_theos(
&self,
instrument_name: &str,
interval: HistoricalTheoInterval,
limit: Option<usize>,
) -> Result<HistoricalTheoResponse>
pub async fn get_historical_theos( &self, instrument_name: &str, interval: HistoricalTheoInterval, limit: Option<usize>, ) -> Result<HistoricalTheoResponse>
Get historical theoretical-price snapshots for an option instrument.
Sourcepub async fn set_margin_mode(
&self,
wallet: &HypercallWallet,
margin_mode: &str,
) -> Result<Value>
pub async fn set_margin_mode( &self, wallet: &HypercallWallet, margin_mode: &str, ) -> Result<Value>
Set margin mode for a wallet.
Sourcepub async fn set_margin_mode_typed(
&self,
wallet: &HypercallWallet,
margin_mode: MarginMode,
) -> Result<Value>
pub async fn set_margin_mode_typed( &self, wallet: &HypercallWallet, margin_mode: MarginMode, ) -> Result<Value>
Set an account’s margin mode using the typed SDK enum.
pub async fn submit_standard_margin_liquidation_with_params<S>(
&self,
liquidator: &S,
params: StandardMarginLiquidationParams,
) -> Result<StandardMarginLiquidationOrderResponse>where
S: HypercallSigner + ?Sized,
Sourcepub async fn fetch_underlying_price(
&self,
currency: &str,
) -> Result<Option<f64>>
pub async fn fetch_underlying_price( &self, currency: &str, ) -> Result<Option<f64>>
Fetch underlying price from options-summary endpoint.
Sourcepub async fn submit_rfq(
&self,
wallet: &HypercallWallet,
rfq_id: &str,
legs: Vec<RfqLegRequest>,
) -> Result<Value>
pub async fn submit_rfq( &self, wallet: &HypercallWallet, rfq_id: &str, legs: Vec<RfqLegRequest>, ) -> Result<Value>
Submit an RFQ (taker-side).
Sourcepub async fn submit_auto_execute_rfq(
&self,
wallet: &HypercallWallet,
rfq_id: &str,
legs: Vec<RfqLegRequest>,
limit_price: Decimal,
) -> Result<Value>
pub async fn submit_auto_execute_rfq( &self, wallet: &HypercallWallet, rfq_id: &str, legs: Vec<RfqLegRequest>, limit_price: Decimal, ) -> Result<Value>
Submit an auto-execute RFQ (taker-side).
Similar to submit_rfq but the taker pre-authorizes execution with
limit_price. Buy RFQs use it as a max debit. Sell RFQs use it as a
min credit. The first QP quote satisfying that directional limit
triggers immediate execution without a separate accept RTT.
Uses the SubmitAutoExecuteRfq EIP-712 type for signing.
Sourcepub async fn accept_rfq_quote(
&self,
wallet: &HypercallWallet,
rfq_id: &str,
quote_id: &str,
net_premium: I256,
) -> Result<Value>
pub async fn accept_rfq_quote( &self, wallet: &HypercallWallet, rfq_id: &str, quote_id: &str, net_premium: I256, ) -> Result<Value>
Accept an RFQ quote (taker-side).
Source§impl HypercallClient
impl HypercallClient
Sourcepub async fn deposit_standard_usdc(
&self,
funder: &HypercallWallet,
params: DepositUsdcParams,
) -> Result<DepositUsdcResult>
pub async fn deposit_standard_usdc( &self, funder: &HypercallWallet, params: DepositUsdcParams, ) -> Result<DepositUsdcResult>
Deposit HyperEVM USDC into a Standard Margin account.
Sourcepub async fn deposit_portfolio_usdc(
&self,
manager: &HypercallWallet,
params: DepositUsdcParams,
) -> Result<DepositUsdcResult>
pub async fn deposit_portfolio_usdc( &self, manager: &HypercallWallet, params: DepositUsdcParams, ) -> Result<DepositUsdcResult>
Deposit HyperEVM USDC into a Portfolio Margin Account.sol through Router.
Sourcepub async fn withdraw_standard_usdc<S>(
&self,
signer: &S,
params: WithdrawUsdcParams,
) -> Result<StandardUsdcWithdrawalResponse>where
S: UsdcWithdrawalSigner + ?Sized,
pub async fn withdraw_standard_usdc<S>(
&self,
signer: &S,
params: WithdrawUsdcParams,
) -> Result<StandardUsdcWithdrawalResponse>where
S: UsdcWithdrawalSigner + ?Sized,
Submit a Standard Margin USDC withdrawal.
The returned response is an acceptance receipt. Poll
HypercallClient::get_directive_status for final delivery.
Sourcepub async fn withdraw_portfolio_usdc<S>(
&self,
signer: &S,
params: WithdrawUsdcParams,
) -> Result<PortfolioUsdcWithdrawalResponse>where
S: UsdcWithdrawalSigner + ?Sized,
pub async fn withdraw_portfolio_usdc<S>(
&self,
signer: &S,
params: WithdrawUsdcParams,
) -> Result<PortfolioUsdcWithdrawalResponse>where
S: UsdcWithdrawalSigner + ?Sized,
Submit a Portfolio Margin USDC withdrawal.
The returned response is an acceptance receipt. Poll
HypercallClient::get_directive_status for final delivery.
Sourcepub async fn prepare_usdc_withdrawal_route(
&self,
destination: AccountAddress,
) -> Result<WithdrawUsdcRoute>
pub async fn prepare_usdc_withdrawal_route( &self, destination: AccountAddress, ) -> Result<WithdrawUsdcRoute>
Resolve and validate the current HyperCore route for a recipient.
Sourcepub async fn withdraw_portfolio_usdc_with_route<S>(
&self,
signer: &S,
params: WithdrawUsdcParams,
route: WithdrawUsdcRoute,
) -> Result<PortfolioUsdcWithdrawalResponse>where
S: UsdcWithdrawalSigner + ?Sized,
pub async fn withdraw_portfolio_usdc_with_route<S>(
&self,
signer: &S,
params: WithdrawUsdcParams,
route: WithdrawUsdcRoute,
) -> Result<PortfolioUsdcWithdrawalResponse>where
S: UsdcWithdrawalSigner + ?Sized,
Submit a Portfolio Margin withdrawal using a previously prepared route.
Retain this route with the nonce after an ambiguous outcome so an exact retry does not depend on the recipient’s current abstraction mode.
Source§impl HypercallClient
impl HypercallClient
Sourcepub async fn update_api_wallet<S>(
&self,
manager: &S,
params: UpdateApiWalletParams,
) -> Result<DirectiveSubmitResponse>where
S: ApiWalletDirectiveSigner + ?Sized,
pub async fn update_api_wallet<S>(
&self,
manager: &S,
params: UpdateApiWalletParams,
) -> Result<DirectiveSubmitResponse>where
S: ApiWalletDirectiveSigner + ?Sized,
Add, replace, or remove an API wallet on a managed Account.sol.
Sourcepub async fn set_account_abstraction<S>(
&self,
signer: &S,
params: SetAccountAbstractionParams,
) -> Result<DirectiveSubmitResponse>where
S: ManagerDirectiveSigner + ?Sized,
pub async fn set_account_abstraction<S>(
&self,
signer: &S,
params: SetAccountAbstractionParams,
) -> Result<DirectiveSubmitResponse>where
S: ManagerDirectiveSigner + ?Sized,
Change a managed Account’s HyperCore abstraction mode.
This manager-authorized directive currently supports only the forward transition to unified-account mode.
pub async fn place_perp_limit_order<S>(
&self,
signer: &S,
params: PerpLimitOrderParams,
) -> Result<DirectiveSubmitResponse>where
S: PerpDirectiveSigner + ?Sized,
pub async fn cancel_perp_order_by_oid<S>(
&self,
signer: &S,
params: PerpCancelByOidParams,
) -> Result<DirectiveSubmitResponse>where
S: PerpDirectiveSigner + ?Sized,
pub async fn cancel_perp_order_by_cloid<S>(
&self,
signer: &S,
params: PerpCancelByCloidParams,
) -> Result<DirectiveSubmitResponse>where
S: PerpDirectiveSigner + ?Sized,
pub async fn get_directive_status( &self, directive_id: &str, ) -> Result<DirectiveStatusResponse>
Source§impl HypercallClient
impl HypercallClient
Sourcepub fn watch_rfq_v2_changes(
&self,
grant: &RfqV2ReadGrant,
after_sequence: u64,
poll_interval: Duration,
) -> Result<Receiver<Result<ListRfqV2ChangesResponse>>>
pub fn watch_rfq_v2_changes( &self, grant: &RfqV2ReadGrant, after_sequence: u64, poll_interval: Duration, ) -> Result<Receiver<Result<ListRfqV2ChangesResponse>>>
Poll the signed recipient change feed even while its WebSocket remains
connected. A WebSocket hint is only a wake-up signal; it cannot prove
that no earlier hint was lost. The caller must refresh each returned
RFQ and persist next_after_sequence only after applying the page.
If applying a page fails, drop the receiver and restart from the last
persisted cursor. Dropping the receiver stops polling. Recreate it
with a fresh grant before the current one expires.
Source§impl HypercallClient
impl HypercallClient
Sourcepub async fn schedule_rfq_v2_quote_cancel(
&self,
request: &RfqV2ScheduledQuoteCancelRequest,
) -> Result<RfqV2ScheduledQuoteCancelResponse>
pub async fn schedule_rfq_v2_quote_cancel( &self, request: &RfqV2ScheduledQuoteCancelRequest, ) -> Result<RfqV2ScheduledQuoteCancelResponse>
Set, renew, or remove a maker-wide V2 firm-quote cancel deadline.
Sourcepub async fn create_rfq_v2(
&self,
request: &CreateRfqV2Request,
) -> Result<CreateRfqV2Response>
pub async fn create_rfq_v2( &self, request: &CreateRfqV2Request, ) -> Result<CreateRfqV2Response>
Relay a signed RFQ parent into the V2 delivery plane.
Sourcepub async fn publish_rfq_v2_indicative_quote(
&self,
rfq_id: Uuid,
request: &PublishRfqV2IndicativeQuoteRequest,
) -> Result<PublishRfqV2QuoteResponse>
pub async fn publish_rfq_v2_indicative_quote( &self, rfq_id: Uuid, request: &PublishRfqV2IndicativeQuoteRequest, ) -> Result<PublishRfqV2QuoteResponse>
Publish a non-executable indicative quote.
Sourcepub async fn publish_rfq_v2_firm_quote(
&self,
rfq_id: Uuid,
request: &PublishRfqV2FirmQuoteRequest,
) -> Result<PublishRfqV2QuoteResponse>
pub async fn publish_rfq_v2_firm_quote( &self, rfq_id: Uuid, request: &PublishRfqV2FirmQuoteRequest, ) -> Result<PublishRfqV2QuoteResponse>
Publish an executable firm quote for best-effort preflight and relay.
Sourcepub async fn request_rfq_v2_firm_quote(
&self,
rfq_id: Uuid,
indicative_quote_id: Uuid,
request: &RequestRfqV2FirmQuoteRequest,
) -> Result<RfqV2OperationResponse>
pub async fn request_rfq_v2_firm_quote( &self, rfq_id: Uuid, indicative_quote_id: Uuid, request: &RequestRfqV2FirmQuoteRequest, ) -> Result<RfqV2OperationResponse>
Ask the maker of an indicative quote for a fresh firm authorization.
Sourcepub async fn decline_rfq_v2(
&self,
rfq_id: Uuid,
request: &DeclineRfqV2Request,
) -> Result<RfqV2OperationResponse>
pub async fn decline_rfq_v2( &self, rfq_id: Uuid, request: &DeclineRfqV2Request, ) -> Result<RfqV2OperationResponse>
Decline an RFQ this maker was routed. Only the taker and this maker can see the decline. It does not affect any quote or execution.
Sourcepub async fn execute_rfq_v2(
&self,
rfq_id: Uuid,
request: &RfqV2ExecutionRequest,
) -> Result<RfqV2ExecutionResponse>
pub async fn execute_rfq_v2( &self, rfq_id: Uuid, request: &RfqV2ExecutionRequest, ) -> Result<RfqV2ExecutionResponse>
Submit one signed firm-quote allocation for execution.
Sourcepub async fn sweep_rfq_v2(
&self,
rfq_id: Uuid,
request: &RfqV2SweepRequest,
) -> Result<RfqV2ExecutionResponse>
pub async fn sweep_rfq_v2( &self, rfq_id: Uuid, request: &RfqV2SweepRequest, ) -> Result<RfqV2ExecutionResponse>
Submit an exact, ordered, all-or-nothing multi-quote allocation.
Sourcepub async fn cancel_rfq_v2(
&self,
rfq_id: Uuid,
request: &RfqV2InvalidationRequest,
) -> Result<RfqV2OperationResponse>
pub async fn cancel_rfq_v2( &self, rfq_id: Uuid, request: &RfqV2InvalidationRequest, ) -> Result<RfqV2OperationResponse>
Make a signed parent RFQ terminal.
Sourcepub async fn withdraw_rfq_v2_quote(
&self,
rfq_id: Uuid,
quote_id: Uuid,
request: &RfqV2InvalidationRequest,
) -> Result<RfqV2OperationResponse>
pub async fn withdraw_rfq_v2_quote( &self, rfq_id: Uuid, quote_id: Uuid, request: &RfqV2InvalidationRequest, ) -> Result<RfqV2OperationResponse>
Make a signed quote terminal when its withdrawal policy permits it.
Sourcepub async fn withdraw_rfq_v2_quotes(
&self,
request: &RfqV2BulkWithdrawalRequest,
) -> Result<RfqV2OperationResponse>
pub async fn withdraw_rfq_v2_quotes( &self, request: &RfqV2BulkWithdrawalRequest, ) -> Result<RfqV2OperationResponse>
Atomically withdraw a signed maker-scoped set of open quotes.
Sourcepub async fn replace_rfq_v2(
&self,
rfq_id: Uuid,
request: &RfqV2ReplacementRequest<CreateRfqV2Request>,
) -> Result<CreateRfqV2Response>
pub async fn replace_rfq_v2( &self, rfq_id: Uuid, request: &RfqV2ReplacementRequest<CreateRfqV2Request>, ) -> Result<CreateRfqV2Response>
Retire a parent and publish a fresh signed replacement.
Sourcepub async fn replace_rfq_v2_quote(
&self,
rfq_id: Uuid,
quote_id: Uuid,
request: &RfqV2ReplacementRequest<RfqV2QuoteReplacement>,
) -> Result<PublishRfqV2QuoteResponse>
pub async fn replace_rfq_v2_quote( &self, rfq_id: Uuid, quote_id: Uuid, request: &RfqV2ReplacementRequest<RfqV2QuoteReplacement>, ) -> Result<PublishRfqV2QuoteResponse>
Retire a quote and publish a fresh signed replacement of the same kind.
Sourcepub async fn get_rfq_v2(
&self,
rfq_id: Uuid,
credentials: RfqV2ReadCredentials<'_>,
) -> Result<RfqV2Response>
pub async fn get_rfq_v2( &self, rfq_id: Uuid, credentials: RfqV2ReadCredentials<'_>, ) -> Result<RfqV2Response>
Read the authorization-aware RFQ view for the current caller.
Sourcepub async fn list_rfqs_v2(
&self,
query: &ListRfqV2Query,
credentials: RfqV2ReadCredentials<'_>,
) -> Result<ListRfqV2Response>
pub async fn list_rfqs_v2( &self, query: &ListRfqV2Query, credentials: RfqV2ReadCredentials<'_>, ) -> Result<ListRfqV2Response>
List RFQs visible to the authorized caller, including terminal history.
Sourcepub async fn list_rfq_v2_changes(
&self,
query: &ListRfqV2ChangesQuery,
credentials: RfqV2ReadCredentials<'_>,
) -> Result<ListRfqV2ChangesResponse>
pub async fn list_rfq_v2_changes( &self, query: &ListRfqV2ChangesQuery, credentials: RfqV2ReadCredentials<'_>, ) -> Result<ListRfqV2ChangesResponse>
List the RFQ IDs that changed for this signed account after a global sequence. Gaps in the sequence are expected.
Sourcepub async fn list_rfq_v2_quotes(
&self,
rfq_id: Uuid,
query: &ListRfqV2QuotesQuery,
credentials: RfqV2ReadCredentials<'_>,
) -> Result<ListRfqV2QuotesResponse>
pub async fn list_rfq_v2_quotes( &self, rfq_id: Uuid, query: &ListRfqV2QuotesQuery, credentials: RfqV2ReadCredentials<'_>, ) -> Result<ListRfqV2QuotesResponse>
List quotes visible to the authorized caller for one RFQ.
Sourcepub async fn get_rfq_v2_quote(
&self,
rfq_id: Uuid,
quote_id: Uuid,
credentials: RfqV2ReadCredentials<'_>,
) -> Result<RfqV2QuoteView>
pub async fn get_rfq_v2_quote( &self, rfq_id: Uuid, quote_id: Uuid, credentials: RfqV2ReadCredentials<'_>, ) -> Result<RfqV2QuoteView>
Read one full quote visible to the authorized caller.
Source§impl HypercallClient
impl HypercallClient
Sourcepub async fn reconcile_rfq_v2_execution(
&self,
rfq_id: Uuid,
request: &RfqV2ExecutionRequest,
policy: RfqV2ReconcilePolicy,
) -> Result<RfqV2ReconciledExecution>
pub async fn reconcile_rfq_v2_execution( &self, rfq_id: Uuid, request: &RfqV2ExecutionRequest, policy: RfqV2ReconcilePolicy, ) -> Result<RfqV2ReconciledExecution>
Reconcile an execution after ClientError::RfqV2SubmissionAmbiguous.
A timeout is not an execution result: the request may still complete later. This resends the identical signed request, byte for byte, under its original operation ID. The server treats that as an exact retry, so a completed operation returns its original result and is never applied twice. It never signs, renumbers, or alters the request. A definite rejection is returned as is; if every resubmission is still ambiguous, the result stays ambiguous.
Sourcepub async fn reconcile_rfq_v2_sweep(
&self,
rfq_id: Uuid,
request: &RfqV2SweepRequest,
policy: RfqV2ReconcilePolicy,
) -> Result<RfqV2ReconciledExecution>
pub async fn reconcile_rfq_v2_sweep( &self, rfq_id: Uuid, request: &RfqV2SweepRequest, policy: RfqV2ReconcilePolicy, ) -> Result<RfqV2ReconciledExecution>
Reconcile a sweep after ClientError::RfqV2SubmissionAmbiguous,
with the same exact-retry rules as
HypercallClient::reconcile_rfq_v2_execution.
Source§impl HypercallClient
impl HypercallClient
Sourcepub async fn next_rfq_v2_quote_page(
&self,
history: &mut RfqV2QuoteHistory,
credentials: RfqV2ReadCredentials<'_>,
) -> Result<()>
pub async fn next_rfq_v2_quote_page( &self, history: &mut RfqV2QuoteHistory, credentials: RfqV2ReadCredentials<'_>, ) -> Result<()>
Fetch the next page of a quote history and merge it. A quote ID seen on an earlier page is a protocol violation and fails the page.
Sourcepub async fn sync_rfq_v2_quote_history(
&self,
history: &mut RfqV2QuoteHistory,
credentials: RfqV2ReadCredentials<'_>,
) -> Result<()>
pub async fn sync_rfq_v2_quote_history( &self, history: &mut RfqV2QuoteHistory, credentials: RfqV2ReadCredentials<'_>, ) -> Result<()>
Page a quote history until the scan is complete.
Sourcepub async fn sync_rfq_v2_mirror(
&self,
mirror: &mut RfqV2PrivateMirror,
credentials: RfqV2ReadCredentials<'_>,
) -> Result<BTreeSet<Uuid>>
pub async fn sync_rfq_v2_mirror( &self, mirror: &mut RfqV2PrivateMirror, credentials: RfqV2ReadCredentials<'_>, ) -> Result<BTreeSet<Uuid>>
Read the recipient change feed from the mirror’s last applied cursor and refresh each named RFQ from authorized reads. The cursor advances page by page, only after that page’s reads are applied, so an error leaves a mirror that resumes safely. Call it after connecting, after every reconnect, whenever a hint requires it, and periodically. It only reads; it never resubmits an operation.
Sourcepub async fn refresh_rfq_v2_execution_action(
&self,
rfq_id: Uuid,
quote_id: Uuid,
requested_units: u128,
observed: Option<&RfqV2QuoteView>,
credentials: RfqV2ReadCredentials<'_>,
) -> Result<RfqV2ExecutionAction>
pub async fn refresh_rfq_v2_execution_action( &self, rfq_id: Uuid, quote_id: Uuid, requested_units: u128, observed: Option<&RfqV2QuoteView>, credentials: RfqV2ReadCredentials<'_>, ) -> Result<RfqV2ExecutionAction>
Decide whether to offer an execution from fresh server reads of the
parent and quote. A cached or event-derived observed view is never
trusted: a stale “capacity remains” event cannot enable a fill whose
capacity is already used.
Sourcepub async fn reconcile_rfq_v2_maker_hold(
&self,
hold: &mut RfqV2MakerHold,
credentials: RfqV2ReadCredentials<'_>,
) -> Result<RfqV2MakerHoldEvidence>
pub async fn reconcile_rfq_v2_maker_hold( &self, hold: &mut RfqV2MakerHold, credentials: RfqV2ReadCredentials<'_>, ) -> Result<RfqV2MakerHoldEvidence>
Re-decide a maker hold from server reads, then advance its change-feed cursor. A 404 or missing status leaves the hold unresolved; only identity-bound own-fill, competing-winner, or terminal evidence releases it. A released hold is final.
Source§impl HypercallClient
impl HypercallClient
Sourcepub async fn server_now_ms(&self) -> Result<u64>
pub async fn server_now_ms(&self) -> Result<u64>
The API server’s current Unix millisecond, from the /health Date
header (cached for a minute per client and its clones).
Sourcepub async fn next_tee_perp_nonce(&self, signer: AccountAddress) -> Result<u64>
pub async fn next_tee_perp_nonce(&self, signer: AccountAddress) -> Result<u64>
Next TEE perp nonce for signer, stamped on the server clock and
strictly increasing per signer within this process.
Sourcepub async fn resend_tee_submission<T>(
&self,
route: &str,
request_json: &str,
) -> Result<T>where
T: DeserializeOwned,
pub async fn resend_tee_submission<T>(
&self,
route: &str,
request_json: &str,
) -> Result<T>where
T: DeserializeOwned,
Resend the exact signed body of a ClientError::TeeSubmissionAmbiguous.
The server recognises the same signed action (same nonce, same terms)
and does not submit it to the venue twice; a repeat comes back with
duplicate_directive and stage unknown, meaning reconcile. Pass the
error’s route and request_json unchanged.
Any failure of the resend, including a 4xx such as an expired
signature, is returned as ClientError::TeeSubmissionAmbiguous: the
original request may still have executed, so reconcile before signing
a fresh action.
Sourcepub async fn place_tee_perp_limit_order<S>(
&self,
signer: &S,
params: PerpLimitOrderParams,
) -> Result<TeePerpOrderResponse>where
S: PerpDirectiveSigner + ?Sized,
pub async fn place_tee_perp_limit_order<S>(
&self,
signer: &S,
params: PerpLimitOrderParams,
) -> Result<TeePerpOrderResponse>where
S: PerpDirectiveSigner + ?Sized,
Place one plain limit order (GTC, IOC, or ALO) on the TEE route.
client_order_id defaults to the nonce.
Sourcepub async fn place_tee_perp_market_order<S>(
&self,
signer: &S,
params: TeePerpMarketOrderParams,
) -> Result<TeePerpOrderResponse>where
S: PerpDirectiveSigner + ?Sized,
pub async fn place_tee_perp_market_order<S>(
&self,
signer: &S,
params: TeePerpMarketOrderParams,
) -> Result<TeePerpOrderResponse>where
S: PerpDirectiveSigner + ?Sized,
Place a market order: an IOC limit bounded by slippage_bps.
Sourcepub async fn place_tee_perp_trigger_order<S>(
&self,
signer: &S,
params: TeePerpTriggerOrderParams,
) -> Result<TeePerpOrderBatchResponse>where
S: TeePerpSigner + ?Sized,
pub async fn place_tee_perp_trigger_order<S>(
&self,
signer: &S,
params: TeePerpTriggerOrderParams,
) -> Result<TeePerpOrderBatchResponse>where
S: TeePerpSigner + ?Sized,
Place one native stop-loss or take-profit order (market or limit).
Sourcepub async fn place_tee_perp_order_batch<S>(
&self,
signer: &S,
params: TeePerpOrderBatchParams,
) -> Result<TeePerpOrderBatchResponse>where
S: TeePerpSigner + ?Sized,
pub async fn place_tee_perp_order_batch<S>(
&self,
signer: &S,
params: TeePerpOrderBatchParams,
) -> Result<TeePerpOrderBatchResponse>where
S: TeePerpSigner + ?Sized,
Submit a caller-built order batch (1 to 100 children).
Sourcepub async fn place_tee_perp_bracket_order<S>(
&self,
signer: &S,
params: TeePerpBracketOrderParams,
) -> Result<TeePerpOrderBatchResponse>where
S: TeePerpSigner + ?Sized,
pub async fn place_tee_perp_bracket_order<S>(
&self,
signer: &S,
params: TeePerpBracketOrderParams,
) -> Result<TeePerpOrderBatchResponse>where
S: TeePerpSigner + ?Sized,
Place an entry with attached TP/SL exits (normalTpsl).
Sourcepub async fn place_tee_perp_position_tpsl<S>(
&self,
signer: &S,
params: TeePerpPositionTpslParams,
) -> Result<TeePerpOrderBatchResponse>where
S: TeePerpSigner + ?Sized,
pub async fn place_tee_perp_position_tpsl<S>(
&self,
signer: &S,
params: TeePerpPositionTpslParams,
) -> Result<TeePerpOrderBatchResponse>where
S: TeePerpSigner + ?Sized,
Place TP/SL exits on an existing position (positionTpsl).
Sourcepub async fn place_tee_perp_scale_order<S>(
&self,
signer: &S,
params: TeePerpScaleOrderParams,
) -> Result<TeePerpOrderBatchResponse>where
S: TeePerpSigner + ?Sized,
pub async fn place_tee_perp_scale_order<S>(
&self,
signer: &S,
params: TeePerpScaleOrderParams,
) -> Result<TeePerpOrderBatchResponse>where
S: TeePerpSigner + ?Sized,
Place a scale order: its legs as one ungrouped batch.
Sourcepub async fn cancel_tee_perp_order_by_oid<S>(
&self,
signer: &S,
params: PerpCancelByOidParams,
) -> Result<TeePerpVenueActionResponse>where
S: PerpDirectiveSigner + ?Sized,
pub async fn cancel_tee_perp_order_by_oid<S>(
&self,
signer: &S,
params: PerpCancelByOidParams,
) -> Result<TeePerpVenueActionResponse>where
S: PerpDirectiveSigner + ?Sized,
Cancel a resting order by Hyperliquid order ID.
Sourcepub async fn cancel_tee_perp_order_by_cloid<S>(
&self,
signer: &S,
params: PerpCancelByCloidParams,
) -> Result<TeePerpCancelResponse>where
S: PerpDirectiveSigner + ?Sized,
pub async fn cancel_tee_perp_order_by_cloid<S>(
&self,
signer: &S,
params: PerpCancelByCloidParams,
) -> Result<TeePerpCancelResponse>where
S: PerpDirectiveSigner + ?Sized,
Cancel a resting order by client order ID.
Sourcepub async fn update_tee_perp_leverage<S>(
&self,
signer: &S,
params: TeePerpLeverageParams,
) -> Result<TeePerpLeverageResponse>where
S: TeePerpSigner + ?Sized,
pub async fn update_tee_perp_leverage<S>(
&self,
signer: &S,
params: TeePerpLeverageParams,
) -> Result<TeePerpLeverageResponse>where
S: TeePerpSigner + ?Sized,
Change leverage and margin mode for one market. Read the venue’s
resulting setting back with HyperliquidInfoClient::active_asset_leverage.
Sourcepub async fn modify_tee_perp_order<S>(
&self,
signer: &S,
params: TeePerpModifyParams,
) -> Result<TeePerpModifyResponse>where
S: TeePerpSigner + ?Sized,
pub async fn modify_tee_perp_order<S>(
&self,
signer: &S,
params: TeePerpModifyParams,
) -> Result<TeePerpModifyResponse>where
S: TeePerpSigner + ?Sized,
Replace one resting limit order’s price, size, side, TIF and
reduce-only flag (Hyperliquid modify). The cloid is preserved.
The engine reserves the larger of the old and new terms until the
outcome is known: rejected or not_submitted restores the old terms
(the original order still rests); accepted moves to the new terms.
An unknown stage must be reconciled before modifying again.
Sourcepub async fn batch_modify_tee_perp_orders<S>(
&self,
signer: &S,
params: TeePerpBatchModifyParams,
) -> Result<TeePerpBatchModifyResponse>where
S: TeePerpSigner + ?Sized,
pub async fn batch_modify_tee_perp_orders<S>(
&self,
signer: &S,
params: TeePerpBatchModifyParams,
) -> Result<TeePerpBatchModifyResponse>where
S: TeePerpSigner + ?Sized,
Replace several resting limit orders in one signed Hyperliquid
batchModify (one nonce, one venue call).
The engine admits every child or none. After the venue answers, each
child settles on its own: read
TeePerpBatchModifyResponse::children (or
TeePerpBatchModifyResponse::children_to_reconcile) rather than only
the whole-action stage, which is accepted or rejected only when
every child agrees. Charged as one order placement per child against
the rate limit.
Refused locally, before signing, when the batch is empty, exceeds
max_children (50 by default), repeats a target or cloid, or carries an
invalid child. A deployment whose enclave release does not enable batch
modify answers 400 unsupported_action
(ClientError::is_unsupported_action).
Sourcepub async fn place_tee_perp_twap_order<S>(
&self,
signer: &S,
params: TeePerpTwapParams,
) -> Result<TeePerpTwapResponse>where
S: TeePerpSigner + ?Sized,
pub async fn place_tee_perp_twap_order<S>(
&self,
signer: &S,
params: TeePerpTwapParams,
) -> Result<TeePerpTwapResponse>where
S: TeePerpSigner + ?Sized,
Start a native Hyperliquid TWAP (twapOrder). The engine reserves
the full size at admission and releases it as fills arrive. Keep
TeePerpTwapResponse::twap_id to cancel it.
TWAP is disabled at runtime on deployments whose enclave release does
not enable it; those answer 400 unsupported_action
(ClientError::is_unsupported_action).
Sourcepub async fn cancel_tee_perp_twap<S>(
&self,
signer: &S,
params: TeePerpTwapCancelParams,
) -> Result<TeePerpVenueActionResponse>where
S: TeePerpSigner + ?Sized,
pub async fn cancel_tee_perp_twap<S>(
&self,
signer: &S,
params: TeePerpTwapCancelParams,
) -> Result<TeePerpVenueActionResponse>where
S: TeePerpSigner + ?Sized,
Cancel a running native TWAP (twapCancel). Like TWAP submit, this
can answer 400 unsupported_action where TWAP is disabled.
Sourcepub async fn preview_tee_perp_action(
&self,
request: &PerpPreviewRequest,
) -> Result<PerpPreviewResponse>
pub async fn preview_tee_perp_action( &self, request: &PerpPreviewRequest, ) -> Result<PerpPreviewResponse>
Preview an action’s admission, margin, liquidation prices and max size without signing or reserving anything.
Sourcepub async fn get_tee_perp_markets(&self) -> Result<TeePerpMarketsResponse>
pub async fn get_tee_perp_markets(&self) -> Result<TeePerpMarketsResponse>
Configured TEE perp markets and whether each is supported.
Sourcepub async fn request_tee_api_wallet_approval<S>(
&self,
manager: &S,
account: AccountAddress,
) -> Result<TeeApiWalletApprovalChallenge>where
S: TeeApiWalletManagerSigner + ?Sized,
pub async fn request_tee_api_wallet_approval<S>(
&self,
manager: &S,
account: AccountAddress,
) -> Result<TeeApiWalletApprovalChallenge>where
S: TeeApiWalletManagerSigner + ?Sized,
Step 1 of enrollment: authenticate as the manager and fetch the
account’s TEE API wallet with its HLAddApiWallet approval payload.
Sourcepub async fn submit_tee_api_wallet_approval<S>(
&self,
manager: &S,
challenge: &TeeApiWalletApprovalChallenge,
) -> Result<DirectiveSubmitResponse>where
S: TeeApiWalletManagerSigner + ?Sized,
pub async fn submit_tee_api_wallet_approval<S>(
&self,
manager: &S,
challenge: &TeeApiWalletApprovalChallenge,
) -> Result<DirectiveSubmitResponse>where
S: TeeApiWalletManagerSigner + ?Sized,
Step 2 of enrollment: sign the approval (after checking the returned typed data names exactly the packaged wallet) and submit it.
Sourcepub async fn enroll_tee_api_wallet<S>(
&self,
manager: &S,
account: AccountAddress,
hyperliquid: &HyperliquidInfoClient,
polling: TeeApiWalletEnrollmentPolling,
) -> Result<TeeApiWalletEnrollment>where
S: TeeApiWalletManagerSigner + ?Sized,
pub async fn enroll_tee_api_wallet<S>(
&self,
manager: &S,
account: AccountAddress,
hyperliquid: &HyperliquidInfoClient,
polling: TeeApiWalletEnrollmentPolling,
) -> Result<TeeApiWalletEnrollment>where
S: TeeApiWalletManagerSigner + ?Sized,
Enroll the account’s TEE API wallet end to end, as the Hypercall order panel does: request it, skip the approval when Hyperliquid already binds it, otherwise submit the approval, poll the directive until it finalizes, and confirm the binding on Hyperliquid.
Sourcepub async fn approve_hypercall_builder(
&self,
manager: &HypercallWallet,
params: ApproveHypercallBuilderParams,
) -> Result<B256>
pub async fn approve_hypercall_builder( &self, manager: &HypercallWallet, params: ApproveHypercallBuilderParams, ) -> Result<B256>
Approve the zero-fee Hypercall builder for the account on Hyperliquid
with one manager HyperEVM transaction calling
Account.approveZeroFeeBuilder(builder). Idempotent on the venue.
Needed once per account before TEE perp orders are accepted (they are
refused with builder_not_approved until then). Requires Account
0.2.4 or newer and a little HYPE on the manager for gas.
Trait Implementations§
Source§impl Clone for HypercallClient
impl Clone for HypercallClient
Auto Trait Implementations§
impl !RefUnwindSafe for HypercallClient
impl !UnwindSafe for HypercallClient
impl Freeze for HypercallClient
impl Send for HypercallClient
impl Sync for HypercallClient
impl Unpin for HypercallClient
impl UnsafeUnpin for HypercallClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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> ⓘ
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