Skip to main content

BetfairDataConfigBuilder

Struct BetfairDataConfigBuilder 

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

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

Implementations§

Source§

impl<S: State> BetfairDataConfigBuilder<S>

Source

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

Finish building and return the requested object

Source

pub fn account_currency( self, value: String, ) -> BetfairDataConfigBuilder<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>, ) -> BetfairDataConfigBuilder<SetAccountCurrency<S>>
where S::AccountCurrency: IsUnset,

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

Account currency code.

Source

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

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

Source

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

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

Source

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

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

Source

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

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

Source

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

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

Source

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

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

Source

pub fn proxy_url( self, value: String, ) -> BetfairDataConfigBuilder<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>, ) -> BetfairDataConfigBuilder<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, ) -> BetfairDataConfigBuilder<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>, ) -> BetfairDataConfigBuilder<SetRequestRatePerSecond<S>>
where S::RequestRatePerSecond: IsUnset,

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

General HTTP request rate limit per second.

Source

pub fn default_min_notional( self, value: f64, ) -> BetfairDataConfigBuilder<SetDefaultMinNotional<S>>
where S::DefaultMinNotional: IsUnset,

Optional (Some / Option setters). Optional default minimum notional in account_currency.

Source

pub fn maybe_default_min_notional( self, value: Option<f64>, ) -> BetfairDataConfigBuilder<SetDefaultMinNotional<S>>
where S::DefaultMinNotional: IsUnset,

Optional (Some / Option setters). Optional default minimum notional in account_currency.

Source

pub fn event_type_ids( self, value: Vec<String>, ) -> BetfairDataConfigBuilder<SetEventTypeIds<S>>
where S::EventTypeIds: IsUnset,

Optional (Some / Option setters). Optional event type ID filter.

Source

pub fn maybe_event_type_ids( self, value: Option<Vec<String>>, ) -> BetfairDataConfigBuilder<SetEventTypeIds<S>>
where S::EventTypeIds: IsUnset,

Optional (Some / Option setters). Optional event type ID filter.

Source

pub fn event_type_names( self, value: Vec<String>, ) -> BetfairDataConfigBuilder<SetEventTypeNames<S>>
where S::EventTypeNames: IsUnset,

Optional (Some / Option setters). Optional event type name filter.

Source

pub fn maybe_event_type_names( self, value: Option<Vec<String>>, ) -> BetfairDataConfigBuilder<SetEventTypeNames<S>>
where S::EventTypeNames: IsUnset,

Optional (Some / Option setters). Optional event type name filter.

Source

pub fn event_ids( self, value: Vec<String>, ) -> BetfairDataConfigBuilder<SetEventIds<S>>
where S::EventIds: IsUnset,

Optional (Some / Option setters). Optional event ID filter.

Source

pub fn maybe_event_ids( self, value: Option<Vec<String>>, ) -> BetfairDataConfigBuilder<SetEventIds<S>>
where S::EventIds: IsUnset,

Optional (Some / Option setters). Optional event ID filter.

Source

pub fn country_codes( self, value: Vec<String>, ) -> BetfairDataConfigBuilder<SetCountryCodes<S>>
where S::CountryCodes: IsUnset,

Optional (Some / Option setters). Optional country code filter.

Source

pub fn maybe_country_codes( self, value: Option<Vec<String>>, ) -> BetfairDataConfigBuilder<SetCountryCodes<S>>
where S::CountryCodes: IsUnset,

Optional (Some / Option setters). Optional country code filter.

Source

pub fn market_types( self, value: Vec<String>, ) -> BetfairDataConfigBuilder<SetMarketTypes<S>>
where S::MarketTypes: IsUnset,

Optional (Some / Option setters). Optional market type filter.

Source

pub fn maybe_market_types( self, value: Option<Vec<String>>, ) -> BetfairDataConfigBuilder<SetMarketTypes<S>>
where S::MarketTypes: IsUnset,

Optional (Some / Option setters). Optional market type filter.

Source

pub fn market_ids( self, value: Vec<String>, ) -> BetfairDataConfigBuilder<SetMarketIds<S>>
where S::MarketIds: IsUnset,

Optional (Some / Option setters). Optional market ID filter.

Source

pub fn maybe_market_ids( self, value: Option<Vec<String>>, ) -> BetfairDataConfigBuilder<SetMarketIds<S>>
where S::MarketIds: IsUnset,

Optional (Some / Option setters). Optional market ID filter.

Source

pub fn min_market_start_time( self, value: String, ) -> BetfairDataConfigBuilder<SetMinMarketStartTime<S>>
where S::MinMarketStartTime: IsUnset,

Optional (Some / Option setters). Optional lower bound for market start time.

Source

pub fn maybe_min_market_start_time( self, value: Option<String>, ) -> BetfairDataConfigBuilder<SetMinMarketStartTime<S>>
where S::MinMarketStartTime: IsUnset,

Optional (Some / Option setters). Optional lower bound for market start time.

Source

pub fn max_market_start_time( self, value: String, ) -> BetfairDataConfigBuilder<SetMaxMarketStartTime<S>>
where S::MaxMarketStartTime: IsUnset,

Optional (Some / Option setters). Optional upper bound for market start time.

Source

pub fn maybe_max_market_start_time( self, value: Option<String>, ) -> BetfairDataConfigBuilder<SetMaxMarketStartTime<S>>
where S::MaxMarketStartTime: IsUnset,

Optional (Some / Option setters). Optional upper bound for market start time.

Source

pub fn stream_host( self, value: String, ) -> BetfairDataConfigBuilder<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>, ) -> BetfairDataConfigBuilder<SetStreamHost<S>>
where S::StreamHost: IsUnset,

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

Source

pub fn stream_port( self, value: u16, ) -> BetfairDataConfigBuilder<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>, ) -> BetfairDataConfigBuilder<SetStreamPort<S>>
where S::StreamPort: IsUnset,

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

Source

pub fn stream_heartbeat_ms( self, value: u64, ) -> BetfairDataConfigBuilder<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>, ) -> BetfairDataConfigBuilder<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, ) -> BetfairDataConfigBuilder<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>, ) -> BetfairDataConfigBuilder<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, ) -> BetfairDataConfigBuilder<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>, ) -> BetfairDataConfigBuilder<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, ) -> BetfairDataConfigBuilder<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>, ) -> BetfairDataConfigBuilder<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, ) -> BetfairDataConfigBuilder<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>, ) -> BetfairDataConfigBuilder<SetStreamUseTls<S>>
where S::StreamUseTls: IsUnset,

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

Whether to use TLS for the stream connection.

Source

pub fn stream_conflate_ms( self, value: u64, ) -> BetfairDataConfigBuilder<SetStreamConflateMs<S>>
where S::StreamConflateMs: IsUnset,

Optional (Some / Option setters). Stream conflation setting in milliseconds. When set, Betfair batches stream updates for this interval. None uses Betfair defaults.

Source

pub fn maybe_stream_conflate_ms( self, value: Option<u64>, ) -> BetfairDataConfigBuilder<SetStreamConflateMs<S>>
where S::StreamConflateMs: IsUnset,

Optional (Some / Option setters). Stream conflation setting in milliseconds. When set, Betfair batches stream updates for this interval. None uses Betfair defaults.

Source

pub fn subscription_delay_secs( self, value: u64, ) -> BetfairDataConfigBuilder<SetSubscriptionDelaySecs<S>>
where S::SubscriptionDelaySecs: IsUnset,

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

Delay in seconds before sending the initial subscription message after connecting.

Source

pub fn maybe_subscription_delay_secs( self, value: Option<u64>, ) -> BetfairDataConfigBuilder<SetSubscriptionDelaySecs<S>>
where S::SubscriptionDelaySecs: IsUnset,

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

Delay in seconds before sending the initial subscription message after connecting.

Source

pub fn subscribe_race_data( self, value: bool, ) -> BetfairDataConfigBuilder<SetSubscribeRaceData<S>>
where S::SubscribeRaceData: IsUnset,

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

Subscribe to the race stream for Total Performance Data (TPD).

Source

pub fn maybe_subscribe_race_data( self, value: Option<bool>, ) -> BetfairDataConfigBuilder<SetSubscribeRaceData<S>>
where S::SubscribeRaceData: IsUnset,

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

Subscribe to the race stream for Total Performance Data (TPD).

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,