Skip to main content

BetfairExecConfigBuilder

Struct BetfairExecConfigBuilder 

Source
pub struct BetfairExecConfigBuilder<S: State = Empty> { /* private fields */ }
Expand description

Use builder syntax to set the inputs and finish with build().

Implementations§

Source§

impl<S: State> BetfairExecConfigBuilder<S>

Source

pub fn build(self) -> BetfairExecConfig
where S: IsComplete,

Finish building and return the requested object

Source

pub fn trader_id( self, value: TraderId, ) -> BetfairExecConfigBuilder<SetTraderId<S>>
where S::TraderId: IsUnset,

Optional (Some / Option setters). Default: TraderId::from("TRADER-001").

Trader ID for the client core.

Source

pub fn maybe_trader_id( self, value: Option<TraderId>, ) -> BetfairExecConfigBuilder<SetTraderId<S>>
where S::TraderId: IsUnset,

Optional (Some / Option setters). Default: TraderId::from("TRADER-001").

Trader ID for the client core.

Source

pub fn account_id( self, value: AccountId, ) -> BetfairExecConfigBuilder<SetAccountId<S>>
where S::AccountId: IsUnset,

Optional (Some / Option setters). Default: AccountId::from("BETFAIR-001").

Account ID for the client core.

Source

pub fn maybe_account_id( self, value: Option<AccountId>, ) -> BetfairExecConfigBuilder<SetAccountId<S>>
where S::AccountId: IsUnset,

Optional (Some / Option setters). Default: AccountId::from("BETFAIR-001").

Account ID for the client core.

Source

pub fn account_currency( self, value: String, ) -> BetfairExecConfigBuilder<SetAccountCurrency<S>>
where S::AccountCurrency: IsUnset,

Optional (Some / Option setters). Default: "GBP".to_string().

Account currency code.

Source

pub fn maybe_account_currency( self, value: Option<String>, ) -> BetfairExecConfigBuilder<SetAccountCurrency<S>>
where S::AccountCurrency: IsUnset,

Optional (Some / Option setters). Default: "GBP".to_string().

Account currency code.

Source

pub fn username(self, value: String) -> BetfairExecConfigBuilder<SetUsername<S>>
where S::Username: IsUnset,

Optional (Some / Option setters). Optional Betfair username.

Source

pub fn maybe_username( self, value: Option<String>, ) -> BetfairExecConfigBuilder<SetUsername<S>>
where S::Username: IsUnset,

Optional (Some / Option setters). Optional Betfair username.

Source

pub fn password(self, value: String) -> BetfairExecConfigBuilder<SetPassword<S>>
where S::Password: IsUnset,

Optional (Some / Option setters). Optional Betfair password.

Source

pub fn maybe_password( self, value: Option<String>, ) -> BetfairExecConfigBuilder<SetPassword<S>>
where S::Password: IsUnset,

Optional (Some / Option setters). Optional Betfair password.

Source

pub fn app_key(self, value: String) -> BetfairExecConfigBuilder<SetAppKey<S>>
where S::AppKey: IsUnset,

Optional (Some / Option setters). Optional Betfair application key.

Source

pub fn maybe_app_key( self, value: Option<String>, ) -> BetfairExecConfigBuilder<SetAppKey<S>>
where S::AppKey: IsUnset,

Optional (Some / Option setters). Optional Betfair application key.

Source

pub fn proxy_url( self, value: String, ) -> BetfairExecConfigBuilder<SetProxyUrl<S>>
where S::ProxyUrl: IsUnset,

Optional (Some / Option setters). Optional proxy URL for HTTP requests.

Source

pub fn maybe_proxy_url( self, value: Option<String>, ) -> BetfairExecConfigBuilder<SetProxyUrl<S>>
where S::ProxyUrl: IsUnset,

Optional (Some / Option setters). Optional proxy URL for HTTP requests.

Source

pub fn request_rate_per_second( self, value: u32, ) -> BetfairExecConfigBuilder<SetRequestRatePerSecond<S>>
where S::RequestRatePerSecond: IsUnset,

Optional (Some / Option setters). Default: 5.

General HTTP request rate limit per second.

Source

pub fn maybe_request_rate_per_second( self, value: Option<u32>, ) -> BetfairExecConfigBuilder<SetRequestRatePerSecond<S>>
where S::RequestRatePerSecond: IsUnset,

Optional (Some / Option setters). Default: 5.

General HTTP request rate limit per second.

Source

pub fn order_request_rate_per_second( self, value: u32, ) -> BetfairExecConfigBuilder<SetOrderRequestRatePerSecond<S>>
where S::OrderRequestRatePerSecond: IsUnset,

Optional (Some / Option setters). Default: 20.

Order HTTP request rate limit per second.

Source

pub fn maybe_order_request_rate_per_second( self, value: Option<u32>, ) -> BetfairExecConfigBuilder<SetOrderRequestRatePerSecond<S>>
where S::OrderRequestRatePerSecond: IsUnset,

Optional (Some / Option setters). Default: 20.

Order HTTP request rate limit per second.

Source

pub fn stream_host( self, value: String, ) -> BetfairExecConfigBuilder<SetStreamHost<S>>
where S::StreamHost: IsUnset,

Optional (Some / Option setters). Optional override for stream host.

Source

pub fn maybe_stream_host( self, value: Option<String>, ) -> BetfairExecConfigBuilder<SetStreamHost<S>>
where S::StreamHost: IsUnset,

Optional (Some / Option setters). Optional override for stream host.

Source

pub fn stream_port( self, value: u16, ) -> BetfairExecConfigBuilder<SetStreamPort<S>>
where S::StreamPort: IsUnset,

Optional (Some / Option setters). Optional override for stream port.

Source

pub fn maybe_stream_port( self, value: Option<u16>, ) -> BetfairExecConfigBuilder<SetStreamPort<S>>
where S::StreamPort: IsUnset,

Optional (Some / Option setters). Optional override for stream port.

Source

pub fn stream_heartbeat_ms( self, value: u64, ) -> BetfairExecConfigBuilder<SetStreamHeartbeatMs<S>>
where S::StreamHeartbeatMs: IsUnset,

Optional (Some / Option setters). Default: 5_000.

Interval between stream heartbeat messages in milliseconds.

Source

pub fn maybe_stream_heartbeat_ms( self, value: Option<u64>, ) -> BetfairExecConfigBuilder<SetStreamHeartbeatMs<S>>
where S::StreamHeartbeatMs: IsUnset,

Optional (Some / Option setters). Default: 5_000.

Interval between stream heartbeat messages in milliseconds.

Source

pub fn stream_idle_timeout_ms( self, value: u64, ) -> BetfairExecConfigBuilder<SetStreamIdleTimeoutMs<S>>
where S::StreamIdleTimeoutMs: IsUnset,

Optional (Some / Option setters). Default: 60_000.

Stream idle timeout in milliseconds.

Source

pub fn maybe_stream_idle_timeout_ms( self, value: Option<u64>, ) -> BetfairExecConfigBuilder<SetStreamIdleTimeoutMs<S>>
where S::StreamIdleTimeoutMs: IsUnset,

Optional (Some / Option setters). Default: 60_000.

Stream idle timeout in milliseconds.

Source

pub fn stream_reconnect_delay_initial_ms( self, value: u64, ) -> BetfairExecConfigBuilder<SetStreamReconnectDelayInitialMs<S>>
where S::StreamReconnectDelayInitialMs: IsUnset,

Optional (Some / Option setters). Default: 2_000.

Initial reconnection backoff in milliseconds.

Source

pub fn maybe_stream_reconnect_delay_initial_ms( self, value: Option<u64>, ) -> BetfairExecConfigBuilder<SetStreamReconnectDelayInitialMs<S>>
where S::StreamReconnectDelayInitialMs: IsUnset,

Optional (Some / Option setters). Default: 2_000.

Initial reconnection backoff in milliseconds.

Source

pub fn stream_reconnect_delay_max_ms( self, value: u64, ) -> BetfairExecConfigBuilder<SetStreamReconnectDelayMaxMs<S>>
where S::StreamReconnectDelayMaxMs: IsUnset,

Optional (Some / Option setters). Default: 30_000.

Maximum reconnection backoff in milliseconds.

Source

pub fn maybe_stream_reconnect_delay_max_ms( self, value: Option<u64>, ) -> BetfairExecConfigBuilder<SetStreamReconnectDelayMaxMs<S>>
where S::StreamReconnectDelayMaxMs: IsUnset,

Optional (Some / Option setters). Default: 30_000.

Maximum reconnection backoff in milliseconds.

Source

pub fn stream_use_tls( self, value: bool, ) -> BetfairExecConfigBuilder<SetStreamUseTls<S>>
where S::StreamUseTls: IsUnset,

Optional (Some / Option setters). Default: true.

Whether to use TLS for the stream connection.

Source

pub fn maybe_stream_use_tls( self, value: Option<bool>, ) -> BetfairExecConfigBuilder<SetStreamUseTls<S>>
where S::StreamUseTls: IsUnset,

Optional (Some / Option setters). Default: true.

Whether to use TLS for the stream connection.

Source

pub fn stream_market_ids_filter( self, value: Vec<String>, ) -> BetfairExecConfigBuilder<SetStreamMarketIdsFilter<S>>
where S::StreamMarketIdsFilter: IsUnset,

Optional (Some / Option setters). Market IDs to filter on the order stream. When set, OCM updates for markets not in this list are skipped. None processes all markets.

Source

pub fn maybe_stream_market_ids_filter( self, value: Option<Vec<String>>, ) -> BetfairExecConfigBuilder<SetStreamMarketIdsFilter<S>>
where S::StreamMarketIdsFilter: IsUnset,

Optional (Some / Option setters). Market IDs to filter on the order stream. When set, OCM updates for markets not in this list are skipped. None processes all markets.

Source

pub fn ignore_external_orders( self, value: bool, ) -> BetfairExecConfigBuilder<SetIgnoreExternalOrders<S>>
where S::IgnoreExternalOrders: IsUnset,

Optional (Some / Option setters). Default: false.

When true, silently ignore orders from OCM that are not tracked in the local cache.

Source

pub fn maybe_ignore_external_orders( self, value: Option<bool>, ) -> BetfairExecConfigBuilder<SetIgnoreExternalOrders<S>>
where S::IgnoreExternalOrders: IsUnset,

Optional (Some / Option setters). Default: false.

When true, silently ignore orders from OCM that are not tracked in the local cache.

Source

pub fn calculate_account_state( self, value: bool, ) -> BetfairExecConfigBuilder<SetCalculateAccountState<S>>
where S::CalculateAccountState: IsUnset,

Optional (Some / Option setters). Default: true.

Whether to poll account state periodically.

Source

pub fn maybe_calculate_account_state( self, value: Option<bool>, ) -> BetfairExecConfigBuilder<SetCalculateAccountState<S>>
where S::CalculateAccountState: IsUnset,

Optional (Some / Option setters). Default: true.

Whether to poll account state periodically.

Source

pub fn request_account_state_secs( self, value: u64, ) -> BetfairExecConfigBuilder<SetRequestAccountStateSecs<S>>
where S::RequestAccountStateSecs: IsUnset,

Optional (Some / Option setters). Default: 300.

Interval in seconds between account state polls.

Source

pub fn maybe_request_account_state_secs( self, value: Option<u64>, ) -> BetfairExecConfigBuilder<SetRequestAccountStateSecs<S>>
where S::RequestAccountStateSecs: IsUnset,

Optional (Some / Option setters). Default: 300.

Interval in seconds between account state polls.

Source

pub fn reconcile_market_ids_only( self, value: bool, ) -> BetfairExecConfigBuilder<SetReconcileMarketIdsOnly<S>>
where S::ReconcileMarketIdsOnly: IsUnset,

Optional (Some / Option setters). Default: false.

When true, reconciliation only requests orders matching reconcile_market_ids.

Source

pub fn maybe_reconcile_market_ids_only( self, value: Option<bool>, ) -> BetfairExecConfigBuilder<SetReconcileMarketIdsOnly<S>>
where S::ReconcileMarketIdsOnly: IsUnset,

Optional (Some / Option setters). Default: false.

When true, reconciliation only requests orders matching reconcile_market_ids.

Source

pub fn reconcile_market_ids( self, value: Vec<String>, ) -> BetfairExecConfigBuilder<SetReconcileMarketIds<S>>
where S::ReconcileMarketIds: IsUnset,

Optional (Some / Option setters). Market IDs to restrict reconciliation to.

Source

pub fn maybe_reconcile_market_ids( self, value: Option<Vec<String>>, ) -> BetfairExecConfigBuilder<SetReconcileMarketIds<S>>
where S::ReconcileMarketIds: IsUnset,

Optional (Some / Option setters). Market IDs to restrict reconciliation to.

Source

pub fn use_market_version( self, value: bool, ) -> BetfairExecConfigBuilder<SetUseMarketVersion<S>>
where S::UseMarketVersion: IsUnset,

Optional (Some / Option setters). Default: false.

When true, attach the latest market version to placeOrders and replaceOrders requests.

Source

pub fn maybe_use_market_version( self, value: Option<bool>, ) -> BetfairExecConfigBuilder<SetUseMarketVersion<S>>
where S::UseMarketVersion: IsUnset,

Optional (Some / Option setters). Default: false.

When true, attach the latest market version to placeOrders and replaceOrders requests.

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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

fn in_current_span(self) -> Instrumented<Self>

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

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

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

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: 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
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: 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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

§

impl<T> Ungil for T
where T: Send,