Skip to main content

DataTesterConfigBuilder

Struct DataTesterConfigBuilder 

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

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

Implementations§

Source§

impl<S: State> DataTesterConfigBuilder<S>

Source

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

Finish building and return the requested object

Source

pub fn base(self, value: DataActorConfig) -> DataTesterConfigBuilder<SetBase<S>>
where S::Base: IsUnset,

Optional (Some / Option setters). Default: <DataActorConfig as Default>::default().

Base data actor configuration.

Source

pub fn maybe_base( self, value: Option<DataActorConfig>, ) -> DataTesterConfigBuilder<SetBase<S>>
where S::Base: IsUnset,

Optional (Some / Option setters). Default: <DataActorConfig as Default>::default().

Base data actor configuration.

Source

pub fn instrument_ids( self, value: Vec<InstrumentId>, ) -> DataTesterConfigBuilder<SetInstrumentIds<S>>
where S::InstrumentIds: IsUnset,

Optional (Some / Option setters). Default: <Vec<InstrumentId> as Default>::default().

Instrument IDs to subscribe to.

Source

pub fn maybe_instrument_ids( self, value: Option<Vec<InstrumentId>>, ) -> DataTesterConfigBuilder<SetInstrumentIds<S>>
where S::InstrumentIds: IsUnset,

Optional (Some / Option setters). Default: <Vec<InstrumentId> as Default>::default().

Instrument IDs to subscribe to.

Source

pub fn client_id( self, value: ClientId, ) -> DataTesterConfigBuilder<SetClientId<S>>
where S::ClientId: IsUnset,

Optional (Some / Option setters). Client ID to use for subscriptions.

Source

pub fn maybe_client_id( self, value: Option<ClientId>, ) -> DataTesterConfigBuilder<SetClientId<S>>
where S::ClientId: IsUnset,

Optional (Some / Option setters). Client ID to use for subscriptions.

Source

pub fn bar_types( self, value: Vec<BarType>, ) -> DataTesterConfigBuilder<SetBarTypes<S>>
where S::BarTypes: IsUnset,

Optional (Some / Option setters). Bar types to subscribe to.

Source

pub fn maybe_bar_types( self, value: Option<Vec<BarType>>, ) -> DataTesterConfigBuilder<SetBarTypes<S>>
where S::BarTypes: IsUnset,

Optional (Some / Option setters). Bar types to subscribe to.

Source

pub fn subscribe_book_deltas( self, value: bool, ) -> DataTesterConfigBuilder<SetSubscribeBookDeltas<S>>
where S::SubscribeBookDeltas: IsUnset,

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

Whether to subscribe to order book deltas.

Source

pub fn maybe_subscribe_book_deltas( self, value: Option<bool>, ) -> DataTesterConfigBuilder<SetSubscribeBookDeltas<S>>
where S::SubscribeBookDeltas: IsUnset,

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

Whether to subscribe to order book deltas.

Source

pub fn subscribe_book_depth( self, value: bool, ) -> DataTesterConfigBuilder<SetSubscribeBookDepth<S>>
where S::SubscribeBookDepth: IsUnset,

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

Whether to subscribe to order book depth snapshots.

Source

pub fn maybe_subscribe_book_depth( self, value: Option<bool>, ) -> DataTesterConfigBuilder<SetSubscribeBookDepth<S>>
where S::SubscribeBookDepth: IsUnset,

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

Whether to subscribe to order book depth snapshots.

Source

pub fn subscribe_book_at_interval( self, value: bool, ) -> DataTesterConfigBuilder<SetSubscribeBookAtInterval<S>>
where S::SubscribeBookAtInterval: IsUnset,

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

Whether to subscribe to order book at interval.

Source

pub fn maybe_subscribe_book_at_interval( self, value: Option<bool>, ) -> DataTesterConfigBuilder<SetSubscribeBookAtInterval<S>>
where S::SubscribeBookAtInterval: IsUnset,

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

Whether to subscribe to order book at interval.

Source

pub fn subscribe_quotes( self, value: bool, ) -> DataTesterConfigBuilder<SetSubscribeQuotes<S>>
where S::SubscribeQuotes: IsUnset,

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

Whether to subscribe to quotes.

Source

pub fn maybe_subscribe_quotes( self, value: Option<bool>, ) -> DataTesterConfigBuilder<SetSubscribeQuotes<S>>
where S::SubscribeQuotes: IsUnset,

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

Whether to subscribe to quotes.

Source

pub fn subscribe_trades( self, value: bool, ) -> DataTesterConfigBuilder<SetSubscribeTrades<S>>
where S::SubscribeTrades: IsUnset,

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

Whether to subscribe to trades.

Source

pub fn maybe_subscribe_trades( self, value: Option<bool>, ) -> DataTesterConfigBuilder<SetSubscribeTrades<S>>
where S::SubscribeTrades: IsUnset,

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

Whether to subscribe to trades.

Source

pub fn subscribe_mark_prices( self, value: bool, ) -> DataTesterConfigBuilder<SetSubscribeMarkPrices<S>>
where S::SubscribeMarkPrices: IsUnset,

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

Whether to subscribe to mark prices.

Source

pub fn maybe_subscribe_mark_prices( self, value: Option<bool>, ) -> DataTesterConfigBuilder<SetSubscribeMarkPrices<S>>
where S::SubscribeMarkPrices: IsUnset,

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

Whether to subscribe to mark prices.

Source

pub fn subscribe_index_prices( self, value: bool, ) -> DataTesterConfigBuilder<SetSubscribeIndexPrices<S>>
where S::SubscribeIndexPrices: IsUnset,

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

Whether to subscribe to index prices.

Source

pub fn maybe_subscribe_index_prices( self, value: Option<bool>, ) -> DataTesterConfigBuilder<SetSubscribeIndexPrices<S>>
where S::SubscribeIndexPrices: IsUnset,

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

Whether to subscribe to index prices.

Source

pub fn subscribe_funding_rates( self, value: bool, ) -> DataTesterConfigBuilder<SetSubscribeFundingRates<S>>
where S::SubscribeFundingRates: IsUnset,

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

Whether to subscribe to funding rates.

Source

pub fn maybe_subscribe_funding_rates( self, value: Option<bool>, ) -> DataTesterConfigBuilder<SetSubscribeFundingRates<S>>
where S::SubscribeFundingRates: IsUnset,

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

Whether to subscribe to funding rates.

Source

pub fn subscribe_bars( self, value: bool, ) -> DataTesterConfigBuilder<SetSubscribeBars<S>>
where S::SubscribeBars: IsUnset,

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

Whether to subscribe to bars.

Source

pub fn maybe_subscribe_bars( self, value: Option<bool>, ) -> DataTesterConfigBuilder<SetSubscribeBars<S>>
where S::SubscribeBars: IsUnset,

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

Whether to subscribe to bars.

Source

pub fn subscribe_instrument( self, value: bool, ) -> DataTesterConfigBuilder<SetSubscribeInstrument<S>>
where S::SubscribeInstrument: IsUnset,

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

Whether to subscribe to instrument updates.

Source

pub fn maybe_subscribe_instrument( self, value: Option<bool>, ) -> DataTesterConfigBuilder<SetSubscribeInstrument<S>>
where S::SubscribeInstrument: IsUnset,

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

Whether to subscribe to instrument updates.

Source

pub fn subscribe_instrument_status( self, value: bool, ) -> DataTesterConfigBuilder<SetSubscribeInstrumentStatus<S>>
where S::SubscribeInstrumentStatus: IsUnset,

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

Whether to subscribe to instrument status.

Source

pub fn maybe_subscribe_instrument_status( self, value: Option<bool>, ) -> DataTesterConfigBuilder<SetSubscribeInstrumentStatus<S>>
where S::SubscribeInstrumentStatus: IsUnset,

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

Whether to subscribe to instrument status.

Source

pub fn subscribe_instrument_close( self, value: bool, ) -> DataTesterConfigBuilder<SetSubscribeInstrumentClose<S>>
where S::SubscribeInstrumentClose: IsUnset,

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

Whether to subscribe to instrument close.

Source

pub fn maybe_subscribe_instrument_close( self, value: Option<bool>, ) -> DataTesterConfigBuilder<SetSubscribeInstrumentClose<S>>
where S::SubscribeInstrumentClose: IsUnset,

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

Whether to subscribe to instrument close.

Source

pub fn subscribe_option_greeks( self, value: bool, ) -> DataTesterConfigBuilder<SetSubscribeOptionGreeks<S>>
where S::SubscribeOptionGreeks: IsUnset,

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

Whether to subscribe to option greeks.

Source

pub fn maybe_subscribe_option_greeks( self, value: Option<bool>, ) -> DataTesterConfigBuilder<SetSubscribeOptionGreeks<S>>
where S::SubscribeOptionGreeks: IsUnset,

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

Whether to subscribe to option greeks.

Source

pub fn subscribe_params( self, value: Params, ) -> DataTesterConfigBuilder<SetSubscribeParams<S>>
where S::SubscribeParams: IsUnset,

Optional (Some / Option setters). Optional parameters passed to all subscribe calls.

Source

pub fn maybe_subscribe_params( self, value: Option<Params>, ) -> DataTesterConfigBuilder<SetSubscribeParams<S>>
where S::SubscribeParams: IsUnset,

Optional (Some / Option setters). Optional parameters passed to all subscribe calls.

Source

pub fn request_params( self, value: Params, ) -> DataTesterConfigBuilder<SetRequestParams<S>>
where S::RequestParams: IsUnset,

Optional (Some / Option setters). Optional parameters passed to all request calls.

Source

pub fn maybe_request_params( self, value: Option<Params>, ) -> DataTesterConfigBuilder<SetRequestParams<S>>
where S::RequestParams: IsUnset,

Optional (Some / Option setters). Optional parameters passed to all request calls.

Source

pub fn can_unsubscribe( self, value: bool, ) -> DataTesterConfigBuilder<SetCanUnsubscribe<S>>
where S::CanUnsubscribe: IsUnset,

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

Whether unsubscribe is supported on stop.

Source

pub fn maybe_can_unsubscribe( self, value: Option<bool>, ) -> DataTesterConfigBuilder<SetCanUnsubscribe<S>>
where S::CanUnsubscribe: IsUnset,

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

Whether unsubscribe is supported on stop.

Source

pub fn request_instruments( self, value: bool, ) -> DataTesterConfigBuilder<SetRequestInstruments<S>>
where S::RequestInstruments: IsUnset,

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

Whether to request instruments on start.

Source

pub fn maybe_request_instruments( self, value: Option<bool>, ) -> DataTesterConfigBuilder<SetRequestInstruments<S>>
where S::RequestInstruments: IsUnset,

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

Whether to request instruments on start.

Source

pub fn request_quotes( self, value: bool, ) -> DataTesterConfigBuilder<SetRequestQuotes<S>>
where S::RequestQuotes: IsUnset,

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

Whether to request historical quotes (not yet implemented).

Source

pub fn maybe_request_quotes( self, value: Option<bool>, ) -> DataTesterConfigBuilder<SetRequestQuotes<S>>
where S::RequestQuotes: IsUnset,

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

Whether to request historical quotes (not yet implemented).

Source

pub fn request_trades( self, value: bool, ) -> DataTesterConfigBuilder<SetRequestTrades<S>>
where S::RequestTrades: IsUnset,

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

Whether to request historical trades (not yet implemented).

Source

pub fn maybe_request_trades( self, value: Option<bool>, ) -> DataTesterConfigBuilder<SetRequestTrades<S>>
where S::RequestTrades: IsUnset,

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

Whether to request historical trades (not yet implemented).

Source

pub fn request_bars( self, value: bool, ) -> DataTesterConfigBuilder<SetRequestBars<S>>
where S::RequestBars: IsUnset,

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

Whether to request historical bars.

Source

pub fn maybe_request_bars( self, value: Option<bool>, ) -> DataTesterConfigBuilder<SetRequestBars<S>>
where S::RequestBars: IsUnset,

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

Whether to request historical bars.

Source

pub fn request_book_snapshot( self, value: bool, ) -> DataTesterConfigBuilder<SetRequestBookSnapshot<S>>
where S::RequestBookSnapshot: IsUnset,

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

Whether to request order book snapshots.

Source

pub fn maybe_request_book_snapshot( self, value: Option<bool>, ) -> DataTesterConfigBuilder<SetRequestBookSnapshot<S>>
where S::RequestBookSnapshot: IsUnset,

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

Whether to request order book snapshots.

Source

pub fn request_book_deltas( self, value: bool, ) -> DataTesterConfigBuilder<SetRequestBookDeltas<S>>
where S::RequestBookDeltas: IsUnset,

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

Whether to request historical order book deltas (not yet implemented).

Source

pub fn maybe_request_book_deltas( self, value: Option<bool>, ) -> DataTesterConfigBuilder<SetRequestBookDeltas<S>>
where S::RequestBookDeltas: IsUnset,

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

Whether to request historical order book deltas (not yet implemented).

Source

pub fn request_funding_rates( self, value: bool, ) -> DataTesterConfigBuilder<SetRequestFundingRates<S>>
where S::RequestFundingRates: IsUnset,

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

Whether to request historical funding rates.

Source

pub fn maybe_request_funding_rates( self, value: Option<bool>, ) -> DataTesterConfigBuilder<SetRequestFundingRates<S>>
where S::RequestFundingRates: IsUnset,

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

Whether to request historical funding rates.

Source

pub fn book_type( self, value: BookType, ) -> DataTesterConfigBuilder<SetBookType<S>>
where S::BookType: IsUnset,

Optional (Some / Option setters). Default: BookType::L2_MBP.

Book type for order book subscriptions.

Source

pub fn maybe_book_type( self, value: Option<BookType>, ) -> DataTesterConfigBuilder<SetBookType<S>>
where S::BookType: IsUnset,

Optional (Some / Option setters). Default: BookType::L2_MBP.

Book type for order book subscriptions.

Source

pub fn book_depth( self, value: NonZeroUsize, ) -> DataTesterConfigBuilder<SetBookDepth<S>>
where S::BookDepth: IsUnset,

Optional (Some / Option setters). Order book depth for subscriptions.

Source

pub fn maybe_book_depth( self, value: Option<NonZeroUsize>, ) -> DataTesterConfigBuilder<SetBookDepth<S>>
where S::BookDepth: IsUnset,

Optional (Some / Option setters). Order book depth for subscriptions.

Source

pub fn book_interval_ms( self, value: NonZeroUsize, ) -> DataTesterConfigBuilder<SetBookIntervalMs<S>>
where S::BookIntervalMs: IsUnset,

Optional (Some / Option setters). Default: NonZeroUsize::new(1000).unwrap().

Order book interval in milliseconds for at_interval subscriptions.

Source

pub fn maybe_book_interval_ms( self, value: Option<NonZeroUsize>, ) -> DataTesterConfigBuilder<SetBookIntervalMs<S>>
where S::BookIntervalMs: IsUnset,

Optional (Some / Option setters). Default: NonZeroUsize::new(1000).unwrap().

Order book interval in milliseconds for at_interval subscriptions.

Source

pub fn book_levels_to_print( self, value: usize, ) -> DataTesterConfigBuilder<SetBookLevelsToPrint<S>>
where S::BookLevelsToPrint: IsUnset,

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

Number of order book levels to print when logging.

Source

pub fn maybe_book_levels_to_print( self, value: Option<usize>, ) -> DataTesterConfigBuilder<SetBookLevelsToPrint<S>>
where S::BookLevelsToPrint: IsUnset,

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

Number of order book levels to print when logging.

Source

pub fn manage_book( self, value: bool, ) -> DataTesterConfigBuilder<SetManageBook<S>>
where S::ManageBook: IsUnset,

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

Whether to manage local order book from deltas.

Source

pub fn maybe_manage_book( self, value: Option<bool>, ) -> DataTesterConfigBuilder<SetManageBook<S>>
where S::ManageBook: IsUnset,

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

Whether to manage local order book from deltas.

Source

pub fn log_data(self, value: bool) -> DataTesterConfigBuilder<SetLogData<S>>
where S::LogData: IsUnset,

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

Whether to log received data.

Source

pub fn maybe_log_data( self, value: Option<bool>, ) -> DataTesterConfigBuilder<SetLogData<S>>
where S::LogData: IsUnset,

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

Whether to log received data.

Source

pub fn stats_interval_secs( self, value: u64, ) -> DataTesterConfigBuilder<SetStatsIntervalSecs<S>>
where S::StatsIntervalSecs: IsUnset,

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

Stats logging interval in seconds (0 to disable).

Source

pub fn maybe_stats_interval_secs( self, value: Option<u64>, ) -> DataTesterConfigBuilder<SetStatsIntervalSecs<S>>
where S::StatsIntervalSecs: IsUnset,

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

Stats logging interval in seconds (0 to disable).

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.

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

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