pub struct DeriveExecutionClientConfigBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> DeriveExecutionClientConfigBuilder<S>
impl<S: State> DeriveExecutionClientConfigBuilder<S>
Sourcepub fn build(self) -> DeriveExecutionClientConfigwhere
S: IsComplete,
pub fn build(self) -> DeriveExecutionClientConfigwhere
S: IsComplete,
Finish building and return the requested object
Sourcepub fn account_id(
self,
value: AccountId,
) -> DeriveExecutionClientConfigBuilder<SetAccountId<S>>where
S::AccountId: IsUnset,
pub fn account_id(
self,
value: AccountId,
) -> DeriveExecutionClientConfigBuilder<SetAccountId<S>>where
S::AccountId: IsUnset,
Sourcepub fn maybe_account_id(
self,
value: Option<AccountId>,
) -> DeriveExecutionClientConfigBuilder<SetAccountId<S>>where
S::AccountId: IsUnset,
pub fn maybe_account_id(
self,
value: Option<AccountId>,
) -> DeriveExecutionClientConfigBuilder<SetAccountId<S>>where
S::AccountId: IsUnset,
Sourcepub fn wallet_address(
self,
value: String,
) -> DeriveExecutionClientConfigBuilder<SetWalletAddress<S>>where
S::WalletAddress: IsUnset,
pub fn wallet_address(
self,
value: String,
) -> DeriveExecutionClientConfigBuilder<SetWalletAddress<S>>where
S::WalletAddress: IsUnset,
Sourcepub fn maybe_wallet_address(
self,
value: Option<String>,
) -> DeriveExecutionClientConfigBuilder<SetWalletAddress<S>>where
S::WalletAddress: IsUnset,
pub fn maybe_wallet_address(
self,
value: Option<String>,
) -> DeriveExecutionClientConfigBuilder<SetWalletAddress<S>>where
S::WalletAddress: IsUnset,
Sourcepub fn session_key(
self,
value: SecretString,
) -> DeriveExecutionClientConfigBuilder<SetSessionKey<S>>where
S::SessionKey: IsUnset,
pub fn session_key(
self,
value: SecretString,
) -> DeriveExecutionClientConfigBuilder<SetSessionKey<S>>where
S::SessionKey: IsUnset,
Sourcepub fn maybe_session_key(
self,
value: Option<SecretString>,
) -> DeriveExecutionClientConfigBuilder<SetSessionKey<S>>where
S::SessionKey: IsUnset,
pub fn maybe_session_key(
self,
value: Option<SecretString>,
) -> DeriveExecutionClientConfigBuilder<SetSessionKey<S>>where
S::SessionKey: IsUnset,
Sourcepub fn subaccount_id(
self,
value: u64,
) -> DeriveExecutionClientConfigBuilder<SetSubaccountId<S>>where
S::SubaccountId: IsUnset,
pub fn subaccount_id(
self,
value: u64,
) -> DeriveExecutionClientConfigBuilder<SetSubaccountId<S>>where
S::SubaccountId: IsUnset,
Sourcepub fn maybe_subaccount_id(
self,
value: Option<u64>,
) -> DeriveExecutionClientConfigBuilder<SetSubaccountId<S>>where
S::SubaccountId: IsUnset,
pub fn maybe_subaccount_id(
self,
value: Option<u64>,
) -> DeriveExecutionClientConfigBuilder<SetSubaccountId<S>>where
S::SubaccountId: IsUnset,
Sourcepub fn environment(
self,
value: DeriveEnvironment,
) -> DeriveExecutionClientConfigBuilder<SetEnvironment<S>>where
S::Environment: IsUnset,
pub fn environment(
self,
value: DeriveEnvironment,
) -> DeriveExecutionClientConfigBuilder<SetEnvironment<S>>where
S::Environment: IsUnset,
Sourcepub fn maybe_environment(
self,
value: Option<DeriveEnvironment>,
) -> DeriveExecutionClientConfigBuilder<SetEnvironment<S>>where
S::Environment: IsUnset,
pub fn maybe_environment(
self,
value: Option<DeriveEnvironment>,
) -> DeriveExecutionClientConfigBuilder<SetEnvironment<S>>where
S::Environment: IsUnset,
Sourcepub fn base_url_rest(
self,
value: String,
) -> DeriveExecutionClientConfigBuilder<SetBaseUrlRest<S>>where
S::BaseUrlRest: IsUnset,
pub fn base_url_rest(
self,
value: String,
) -> DeriveExecutionClientConfigBuilder<SetBaseUrlRest<S>>where
S::BaseUrlRest: IsUnset,
Sourcepub fn maybe_base_url_rest(
self,
value: Option<String>,
) -> DeriveExecutionClientConfigBuilder<SetBaseUrlRest<S>>where
S::BaseUrlRest: IsUnset,
pub fn maybe_base_url_rest(
self,
value: Option<String>,
) -> DeriveExecutionClientConfigBuilder<SetBaseUrlRest<S>>where
S::BaseUrlRest: IsUnset,
Sourcepub fn base_url_ws(
self,
value: String,
) -> DeriveExecutionClientConfigBuilder<SetBaseUrlWs<S>>where
S::BaseUrlWs: IsUnset,
pub fn base_url_ws(
self,
value: String,
) -> DeriveExecutionClientConfigBuilder<SetBaseUrlWs<S>>where
S::BaseUrlWs: IsUnset,
Sourcepub fn maybe_base_url_ws(
self,
value: Option<String>,
) -> DeriveExecutionClientConfigBuilder<SetBaseUrlWs<S>>where
S::BaseUrlWs: IsUnset,
pub fn maybe_base_url_ws(
self,
value: Option<String>,
) -> DeriveExecutionClientConfigBuilder<SetBaseUrlWs<S>>where
S::BaseUrlWs: IsUnset,
Sourcepub fn proxy_url(
self,
value: SecretString,
) -> DeriveExecutionClientConfigBuilder<SetProxyUrl<S>>where
S::ProxyUrl: IsUnset,
pub fn proxy_url(
self,
value: SecretString,
) -> DeriveExecutionClientConfigBuilder<SetProxyUrl<S>>where
S::ProxyUrl: IsUnset,
Sourcepub fn maybe_proxy_url(
self,
value: Option<SecretString>,
) -> DeriveExecutionClientConfigBuilder<SetProxyUrl<S>>where
S::ProxyUrl: IsUnset,
pub fn maybe_proxy_url(
self,
value: Option<SecretString>,
) -> DeriveExecutionClientConfigBuilder<SetProxyUrl<S>>where
S::ProxyUrl: IsUnset,
Sourcepub fn http_timeout_secs(
self,
value: u64,
) -> DeriveExecutionClientConfigBuilder<SetHttpTimeoutSecs<S>>where
S::HttpTimeoutSecs: IsUnset,
pub fn http_timeout_secs(
self,
value: u64,
) -> DeriveExecutionClientConfigBuilder<SetHttpTimeoutSecs<S>>where
S::HttpTimeoutSecs: IsUnset,
Sourcepub fn maybe_http_timeout_secs(
self,
value: Option<u64>,
) -> DeriveExecutionClientConfigBuilder<SetHttpTimeoutSecs<S>>where
S::HttpTimeoutSecs: IsUnset,
pub fn maybe_http_timeout_secs(
self,
value: Option<u64>,
) -> DeriveExecutionClientConfigBuilder<SetHttpTimeoutSecs<S>>where
S::HttpTimeoutSecs: IsUnset,
Sourcepub fn max_retries(
self,
value: u32,
) -> DeriveExecutionClientConfigBuilder<SetMaxRetries<S>>where
S::MaxRetries: IsUnset,
pub fn max_retries(
self,
value: u32,
) -> DeriveExecutionClientConfigBuilder<SetMaxRetries<S>>where
S::MaxRetries: IsUnset,
Sourcepub fn maybe_max_retries(
self,
value: Option<u32>,
) -> DeriveExecutionClientConfigBuilder<SetMaxRetries<S>>where
S::MaxRetries: IsUnset,
pub fn maybe_max_retries(
self,
value: Option<u32>,
) -> DeriveExecutionClientConfigBuilder<SetMaxRetries<S>>where
S::MaxRetries: IsUnset,
Sourcepub fn retry_delay_initial_ms(
self,
value: u64,
) -> DeriveExecutionClientConfigBuilder<SetRetryDelayInitialMs<S>>where
S::RetryDelayInitialMs: IsUnset,
pub fn retry_delay_initial_ms(
self,
value: u64,
) -> DeriveExecutionClientConfigBuilder<SetRetryDelayInitialMs<S>>where
S::RetryDelayInitialMs: IsUnset,
Sourcepub fn maybe_retry_delay_initial_ms(
self,
value: Option<u64>,
) -> DeriveExecutionClientConfigBuilder<SetRetryDelayInitialMs<S>>where
S::RetryDelayInitialMs: IsUnset,
pub fn maybe_retry_delay_initial_ms(
self,
value: Option<u64>,
) -> DeriveExecutionClientConfigBuilder<SetRetryDelayInitialMs<S>>where
S::RetryDelayInitialMs: IsUnset,
Sourcepub fn retry_delay_max_ms(
self,
value: u64,
) -> DeriveExecutionClientConfigBuilder<SetRetryDelayMaxMs<S>>where
S::RetryDelayMaxMs: IsUnset,
pub fn retry_delay_max_ms(
self,
value: u64,
) -> DeriveExecutionClientConfigBuilder<SetRetryDelayMaxMs<S>>where
S::RetryDelayMaxMs: IsUnset,
Sourcepub fn maybe_retry_delay_max_ms(
self,
value: Option<u64>,
) -> DeriveExecutionClientConfigBuilder<SetRetryDelayMaxMs<S>>where
S::RetryDelayMaxMs: IsUnset,
pub fn maybe_retry_delay_max_ms(
self,
value: Option<u64>,
) -> DeriveExecutionClientConfigBuilder<SetRetryDelayMaxMs<S>>where
S::RetryDelayMaxMs: IsUnset,
Sourcepub fn ws_timeout_secs(
self,
value: u64,
) -> DeriveExecutionClientConfigBuilder<SetWsTimeoutSecs<S>>where
S::WsTimeoutSecs: IsUnset,
pub fn ws_timeout_secs(
self,
value: u64,
) -> DeriveExecutionClientConfigBuilder<SetWsTimeoutSecs<S>>where
S::WsTimeoutSecs: IsUnset,
Sourcepub fn maybe_ws_timeout_secs(
self,
value: Option<u64>,
) -> DeriveExecutionClientConfigBuilder<SetWsTimeoutSecs<S>>where
S::WsTimeoutSecs: IsUnset,
pub fn maybe_ws_timeout_secs(
self,
value: Option<u64>,
) -> DeriveExecutionClientConfigBuilder<SetWsTimeoutSecs<S>>where
S::WsTimeoutSecs: IsUnset,
Sourcepub fn max_fee_per_contract(
self,
value: Decimal,
) -> DeriveExecutionClientConfigBuilder<SetMaxFeePerContract<S>>where
S::MaxFeePerContract: IsUnset,
pub fn max_fee_per_contract(
self,
value: Decimal,
) -> DeriveExecutionClientConfigBuilder<SetMaxFeePerContract<S>>where
S::MaxFeePerContract: IsUnset,
Sourcepub fn maybe_max_fee_per_contract(
self,
value: Option<Decimal>,
) -> DeriveExecutionClientConfigBuilder<SetMaxFeePerContract<S>>where
S::MaxFeePerContract: IsUnset,
pub fn maybe_max_fee_per_contract(
self,
value: Option<Decimal>,
) -> DeriveExecutionClientConfigBuilder<SetMaxFeePerContract<S>>where
S::MaxFeePerContract: IsUnset,
Sourcepub fn transport_backend(
self,
value: TransportBackend,
) -> DeriveExecutionClientConfigBuilder<SetTransportBackend<S>>where
S::TransportBackend: IsUnset,
pub fn transport_backend(
self,
value: TransportBackend,
) -> DeriveExecutionClientConfigBuilder<SetTransportBackend<S>>where
S::TransportBackend: IsUnset,
Sourcepub fn maybe_transport_backend(
self,
value: Option<TransportBackend>,
) -> DeriveExecutionClientConfigBuilder<SetTransportBackend<S>>where
S::TransportBackend: IsUnset,
pub fn maybe_transport_backend(
self,
value: Option<TransportBackend>,
) -> DeriveExecutionClientConfigBuilder<SetTransportBackend<S>>where
S::TransportBackend: IsUnset,
Sourcepub fn domain_separator(
self,
value: String,
) -> DeriveExecutionClientConfigBuilder<SetDomainSeparator<S>>where
S::DomainSeparator: IsUnset,
pub fn domain_separator(
self,
value: String,
) -> DeriveExecutionClientConfigBuilder<SetDomainSeparator<S>>where
S::DomainSeparator: IsUnset,
Sourcepub fn maybe_domain_separator(
self,
value: Option<String>,
) -> DeriveExecutionClientConfigBuilder<SetDomainSeparator<S>>where
S::DomainSeparator: IsUnset,
pub fn maybe_domain_separator(
self,
value: Option<String>,
) -> DeriveExecutionClientConfigBuilder<SetDomainSeparator<S>>where
S::DomainSeparator: IsUnset,
Sourcepub fn action_typehash(
self,
value: String,
) -> DeriveExecutionClientConfigBuilder<SetActionTypehash<S>>where
S::ActionTypehash: IsUnset,
pub fn action_typehash(
self,
value: String,
) -> DeriveExecutionClientConfigBuilder<SetActionTypehash<S>>where
S::ActionTypehash: IsUnset,
Optional (Some / Option setters).
Override for the EIP-712 action typehash. Falls back to the shipped
crate::common::consts::ACTION_TYPEHASH when unset.
Sourcepub fn maybe_action_typehash(
self,
value: Option<String>,
) -> DeriveExecutionClientConfigBuilder<SetActionTypehash<S>>where
S::ActionTypehash: IsUnset,
pub fn maybe_action_typehash(
self,
value: Option<String>,
) -> DeriveExecutionClientConfigBuilder<SetActionTypehash<S>>where
S::ActionTypehash: IsUnset,
Optional (Some / Option setters).
Override for the EIP-712 action typehash. Falls back to the shipped
crate::common::consts::ACTION_TYPEHASH when unset.
Sourcepub fn trade_module_address(
self,
value: String,
) -> DeriveExecutionClientConfigBuilder<SetTradeModuleAddress<S>>where
S::TradeModuleAddress: IsUnset,
pub fn trade_module_address(
self,
value: String,
) -> DeriveExecutionClientConfigBuilder<SetTradeModuleAddress<S>>where
S::TradeModuleAddress: IsUnset,
Sourcepub fn maybe_trade_module_address(
self,
value: Option<String>,
) -> DeriveExecutionClientConfigBuilder<SetTradeModuleAddress<S>>where
S::TradeModuleAddress: IsUnset,
pub fn maybe_trade_module_address(
self,
value: Option<String>,
) -> DeriveExecutionClientConfigBuilder<SetTradeModuleAddress<S>>where
S::TradeModuleAddress: IsUnset,
Sourcepub fn signature_expiry_secs(
self,
value: u64,
) -> DeriveExecutionClientConfigBuilder<SetSignatureExpirySecs<S>>where
S::SignatureExpirySecs: IsUnset,
pub fn signature_expiry_secs(
self,
value: u64,
) -> DeriveExecutionClientConfigBuilder<SetSignatureExpirySecs<S>>where
S::SignatureExpirySecs: IsUnset,
Optional (Some / Option setters).
Default: 600.
Signature expiry TTL in seconds for normal orders and replaces (added
to the wall clock before signing). Must be greater than the venue
minimum (crate::common::consts::MIN_SIGNATURE_TTL, 10s) and at most 120 days.
Sourcepub fn maybe_signature_expiry_secs(
self,
value: Option<u64>,
) -> DeriveExecutionClientConfigBuilder<SetSignatureExpirySecs<S>>where
S::SignatureExpirySecs: IsUnset,
pub fn maybe_signature_expiry_secs(
self,
value: Option<u64>,
) -> DeriveExecutionClientConfigBuilder<SetSignatureExpirySecs<S>>where
S::SignatureExpirySecs: IsUnset,
Optional (Some / Option setters).
Default: 600.
Signature expiry TTL in seconds for normal orders and replaces (added
to the wall clock before signing). Must be greater than the venue
minimum (crate::common::consts::MIN_SIGNATURE_TTL, 10s) and at most 120 days.
Sourcepub fn market_order_slippage_bps(
self,
value: u32,
) -> DeriveExecutionClientConfigBuilder<SetMarketOrderSlippageBps<S>>where
S::MarketOrderSlippageBps: IsUnset,
pub fn market_order_slippage_bps(
self,
value: u32,
) -> DeriveExecutionClientConfigBuilder<SetMarketOrderSlippageBps<S>>where
S::MarketOrderSlippageBps: IsUnset,
Sourcepub fn maybe_market_order_slippage_bps(
self,
value: Option<u32>,
) -> DeriveExecutionClientConfigBuilder<SetMarketOrderSlippageBps<S>>where
S::MarketOrderSlippageBps: IsUnset,
pub fn maybe_market_order_slippage_bps(
self,
value: Option<u32>,
) -> DeriveExecutionClientConfigBuilder<SetMarketOrderSlippageBps<S>>where
S::MarketOrderSlippageBps: IsUnset,
Sourcepub fn max_matching_requests_per_second(
self,
value: u32,
) -> DeriveExecutionClientConfigBuilder<SetMaxMatchingRequestsPerSecond<S>>where
S::MaxMatchingRequestsPerSecond: IsUnset,
pub fn max_matching_requests_per_second(
self,
value: u32,
) -> DeriveExecutionClientConfigBuilder<SetMaxMatchingRequestsPerSecond<S>>where
S::MaxMatchingRequestsPerSecond: IsUnset,
Optional (Some / Option setters).
Maximum wallet matching requests per second across HTTP, WebSocket,
session keys, and subaccounts on the same API host. Defaults to 1 when
unset. The first explicit setting for a wallet is shared by all clients;
the limiter ignores conflicting later settings. Verify deployed budgets with
public/getRateLimits. See https://docs.derive.xyz/rate-limits.
Sourcepub fn maybe_max_matching_requests_per_second(
self,
value: Option<u32>,
) -> DeriveExecutionClientConfigBuilder<SetMaxMatchingRequestsPerSecond<S>>where
S::MaxMatchingRequestsPerSecond: IsUnset,
pub fn maybe_max_matching_requests_per_second(
self,
value: Option<u32>,
) -> DeriveExecutionClientConfigBuilder<SetMaxMatchingRequestsPerSecond<S>>where
S::MaxMatchingRequestsPerSecond: IsUnset,
Optional (Some / Option setters).
Maximum wallet matching requests per second across HTTP, WebSocket,
session keys, and subaccounts on the same API host. Defaults to 1 when
unset. The first explicit setting for a wallet is shared by all clients;
the limiter ignores conflicting later settings. Verify deployed budgets with
public/getRateLimits. See https://docs.derive.xyz/rate-limits.
Sourcepub fn max_per_instrument_matching_requests_per_second(
self,
value: u32,
) -> DeriveExecutionClientConfigBuilder<SetMaxPerInstrumentMatchingRequestsPerSecond<S>>where
S::MaxPerInstrumentMatchingRequestsPerSecond: IsUnset,
pub fn max_per_instrument_matching_requests_per_second(
self,
value: u32,
) -> DeriveExecutionClientConfigBuilder<SetMaxPerInstrumentMatchingRequestsPerSecond<S>>where
S::MaxPerInstrumentMatchingRequestsPerSecond: IsUnset,
Optional (Some / Option setters).
Per-wallet/instrument token refill rate for perpetuals, spot, and options.
Defaults to 1 token per second; capacity is five times the configured rate.
Clients for the same wallet on the same API host share the first explicit
setting, independently of the wallet matching allowance. Instrument budgets
are absent from public/getRateLimits.
See https://docs.derive.xyz/rate-limits.
Sourcepub fn maybe_max_per_instrument_matching_requests_per_second(
self,
value: Option<u32>,
) -> DeriveExecutionClientConfigBuilder<SetMaxPerInstrumentMatchingRequestsPerSecond<S>>where
S::MaxPerInstrumentMatchingRequestsPerSecond: IsUnset,
pub fn maybe_max_per_instrument_matching_requests_per_second(
self,
value: Option<u32>,
) -> DeriveExecutionClientConfigBuilder<SetMaxPerInstrumentMatchingRequestsPerSecond<S>>where
S::MaxPerInstrumentMatchingRequestsPerSecond: IsUnset,
Optional (Some / Option setters).
Per-wallet/instrument token refill rate for perpetuals, spot, and options.
Defaults to 1 token per second; capacity is five times the configured rate.
Clients for the same wallet on the same API host share the first explicit
setting, independently of the wallet matching allowance. Instrument budgets
are absent from public/getRateLimits.
See https://docs.derive.xyz/rate-limits.
Auto Trait Implementations§
impl<S> Freeze for DeriveExecutionClientConfigBuilder<S>
impl<S> RefUnwindSafe for DeriveExecutionClientConfigBuilder<S>
impl<S> Send for DeriveExecutionClientConfigBuilder<S>
impl<S> Sync for DeriveExecutionClientConfigBuilder<S>
impl<S> Unpin for DeriveExecutionClientConfigBuilder<S>
impl<S> UnsafeUnpin for DeriveExecutionClientConfigBuilder<S>
impl<S> UnwindSafe for DeriveExecutionClientConfigBuilder<S>
Blanket Implementations§
impl<T> Allocation for T
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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