pub struct BacktestEngineConfigBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> BacktestEngineConfigBuilder<S>
impl<S: State> BacktestEngineConfigBuilder<S>
Sourcepub fn build(self) -> BacktestEngineConfigwhere
S: IsComplete,
pub fn build(self) -> BacktestEngineConfigwhere
S: IsComplete,
Finish building and return the requested object
Sourcepub fn environment(
self,
value: Environment,
) -> BacktestEngineConfigBuilder<SetEnvironment<S>>where
S::Environment: IsUnset,
pub fn environment(
self,
value: Environment,
) -> BacktestEngineConfigBuilder<SetEnvironment<S>>where
S::Environment: IsUnset,
Sourcepub fn maybe_environment(
self,
value: Option<Environment>,
) -> BacktestEngineConfigBuilder<SetEnvironment<S>>where
S::Environment: IsUnset,
pub fn maybe_environment(
self,
value: Option<Environment>,
) -> BacktestEngineConfigBuilder<SetEnvironment<S>>where
S::Environment: IsUnset,
Sourcepub fn trader_id(
self,
value: TraderId,
) -> BacktestEngineConfigBuilder<SetTraderId<S>>where
S::TraderId: IsUnset,
pub fn trader_id(
self,
value: TraderId,
) -> BacktestEngineConfigBuilder<SetTraderId<S>>where
S::TraderId: IsUnset,
Sourcepub fn maybe_trader_id(
self,
value: Option<TraderId>,
) -> BacktestEngineConfigBuilder<SetTraderId<S>>where
S::TraderId: IsUnset,
pub fn maybe_trader_id(
self,
value: Option<TraderId>,
) -> BacktestEngineConfigBuilder<SetTraderId<S>>where
S::TraderId: IsUnset,
Sourcepub fn load_state(
self,
value: bool,
) -> BacktestEngineConfigBuilder<SetLoadState<S>>where
S::LoadState: IsUnset,
pub fn load_state(
self,
value: bool,
) -> BacktestEngineConfigBuilder<SetLoadState<S>>where
S::LoadState: IsUnset,
Sourcepub fn maybe_load_state(
self,
value: Option<bool>,
) -> BacktestEngineConfigBuilder<SetLoadState<S>>where
S::LoadState: IsUnset,
pub fn maybe_load_state(
self,
value: Option<bool>,
) -> BacktestEngineConfigBuilder<SetLoadState<S>>where
S::LoadState: IsUnset,
Sourcepub fn save_state(
self,
value: bool,
) -> BacktestEngineConfigBuilder<SetSaveState<S>>where
S::SaveState: IsUnset,
pub fn save_state(
self,
value: bool,
) -> BacktestEngineConfigBuilder<SetSaveState<S>>where
S::SaveState: IsUnset,
Sourcepub fn maybe_save_state(
self,
value: Option<bool>,
) -> BacktestEngineConfigBuilder<SetSaveState<S>>where
S::SaveState: IsUnset,
pub fn maybe_save_state(
self,
value: Option<bool>,
) -> BacktestEngineConfigBuilder<SetSaveState<S>>where
S::SaveState: IsUnset,
Sourcepub fn logging(
self,
value: LoggerConfig,
) -> BacktestEngineConfigBuilder<SetLogging<S>>where
S::Logging: IsUnset,
pub fn logging(
self,
value: LoggerConfig,
) -> BacktestEngineConfigBuilder<SetLogging<S>>where
S::Logging: IsUnset,
Sourcepub fn maybe_logging(
self,
value: Option<LoggerConfig>,
) -> BacktestEngineConfigBuilder<SetLogging<S>>where
S::Logging: IsUnset,
pub fn maybe_logging(
self,
value: Option<LoggerConfig>,
) -> BacktestEngineConfigBuilder<SetLogging<S>>where
S::Logging: IsUnset,
Sourcepub fn instance_id(
self,
value: UUID4,
) -> BacktestEngineConfigBuilder<SetInstanceId<S>>where
S::InstanceId: IsUnset,
pub fn instance_id(
self,
value: UUID4,
) -> BacktestEngineConfigBuilder<SetInstanceId<S>>where
S::InstanceId: IsUnset,
Sourcepub fn maybe_instance_id(
self,
value: Option<UUID4>,
) -> BacktestEngineConfigBuilder<SetInstanceId<S>>where
S::InstanceId: IsUnset,
pub fn maybe_instance_id(
self,
value: Option<UUID4>,
) -> BacktestEngineConfigBuilder<SetInstanceId<S>>where
S::InstanceId: IsUnset,
Sourcepub fn timeout_connection(
self,
value: Duration,
) -> BacktestEngineConfigBuilder<SetTimeoutConnection<S>>where
S::TimeoutConnection: IsUnset,
pub fn timeout_connection(
self,
value: Duration,
) -> BacktestEngineConfigBuilder<SetTimeoutConnection<S>>where
S::TimeoutConnection: IsUnset,
Sourcepub fn maybe_timeout_connection(
self,
value: Option<Duration>,
) -> BacktestEngineConfigBuilder<SetTimeoutConnection<S>>where
S::TimeoutConnection: IsUnset,
pub fn maybe_timeout_connection(
self,
value: Option<Duration>,
) -> BacktestEngineConfigBuilder<SetTimeoutConnection<S>>where
S::TimeoutConnection: IsUnset,
Sourcepub fn timeout_reconciliation(
self,
value: Duration,
) -> BacktestEngineConfigBuilder<SetTimeoutReconciliation<S>>where
S::TimeoutReconciliation: IsUnset,
pub fn timeout_reconciliation(
self,
value: Duration,
) -> BacktestEngineConfigBuilder<SetTimeoutReconciliation<S>>where
S::TimeoutReconciliation: IsUnset,
Sourcepub fn maybe_timeout_reconciliation(
self,
value: Option<Duration>,
) -> BacktestEngineConfigBuilder<SetTimeoutReconciliation<S>>where
S::TimeoutReconciliation: IsUnset,
pub fn maybe_timeout_reconciliation(
self,
value: Option<Duration>,
) -> BacktestEngineConfigBuilder<SetTimeoutReconciliation<S>>where
S::TimeoutReconciliation: IsUnset,
Sourcepub fn timeout_portfolio(
self,
value: Duration,
) -> BacktestEngineConfigBuilder<SetTimeoutPortfolio<S>>where
S::TimeoutPortfolio: IsUnset,
pub fn timeout_portfolio(
self,
value: Duration,
) -> BacktestEngineConfigBuilder<SetTimeoutPortfolio<S>>where
S::TimeoutPortfolio: IsUnset,
Sourcepub fn maybe_timeout_portfolio(
self,
value: Option<Duration>,
) -> BacktestEngineConfigBuilder<SetTimeoutPortfolio<S>>where
S::TimeoutPortfolio: IsUnset,
pub fn maybe_timeout_portfolio(
self,
value: Option<Duration>,
) -> BacktestEngineConfigBuilder<SetTimeoutPortfolio<S>>where
S::TimeoutPortfolio: IsUnset,
Sourcepub fn timeout_disconnection(
self,
value: Duration,
) -> BacktestEngineConfigBuilder<SetTimeoutDisconnection<S>>where
S::TimeoutDisconnection: IsUnset,
pub fn timeout_disconnection(
self,
value: Duration,
) -> BacktestEngineConfigBuilder<SetTimeoutDisconnection<S>>where
S::TimeoutDisconnection: IsUnset,
Sourcepub fn maybe_timeout_disconnection(
self,
value: Option<Duration>,
) -> BacktestEngineConfigBuilder<SetTimeoutDisconnection<S>>where
S::TimeoutDisconnection: IsUnset,
pub fn maybe_timeout_disconnection(
self,
value: Option<Duration>,
) -> BacktestEngineConfigBuilder<SetTimeoutDisconnection<S>>where
S::TimeoutDisconnection: IsUnset,
Sourcepub fn delay_post_stop(
self,
value: Duration,
) -> BacktestEngineConfigBuilder<SetDelayPostStop<S>>where
S::DelayPostStop: IsUnset,
pub fn delay_post_stop(
self,
value: Duration,
) -> BacktestEngineConfigBuilder<SetDelayPostStop<S>>where
S::DelayPostStop: IsUnset,
Sourcepub fn maybe_delay_post_stop(
self,
value: Option<Duration>,
) -> BacktestEngineConfigBuilder<SetDelayPostStop<S>>where
S::DelayPostStop: IsUnset,
pub fn maybe_delay_post_stop(
self,
value: Option<Duration>,
) -> BacktestEngineConfigBuilder<SetDelayPostStop<S>>where
S::DelayPostStop: IsUnset,
Sourcepub fn timeout_shutdown(
self,
value: Duration,
) -> BacktestEngineConfigBuilder<SetTimeoutShutdown<S>>where
S::TimeoutShutdown: IsUnset,
pub fn timeout_shutdown(
self,
value: Duration,
) -> BacktestEngineConfigBuilder<SetTimeoutShutdown<S>>where
S::TimeoutShutdown: IsUnset,
Sourcepub fn maybe_timeout_shutdown(
self,
value: Option<Duration>,
) -> BacktestEngineConfigBuilder<SetTimeoutShutdown<S>>where
S::TimeoutShutdown: IsUnset,
pub fn maybe_timeout_shutdown(
self,
value: Option<Duration>,
) -> BacktestEngineConfigBuilder<SetTimeoutShutdown<S>>where
S::TimeoutShutdown: IsUnset,
Sourcepub fn cache(
self,
value: CacheConfig,
) -> BacktestEngineConfigBuilder<SetCache<S>>where
S::Cache: IsUnset,
pub fn cache(
self,
value: CacheConfig,
) -> BacktestEngineConfigBuilder<SetCache<S>>where
S::Cache: IsUnset,
Optional (Some / Option setters). The cache configuration.
crate::engine::BacktestEngine always overrides
drop_instruments_on_reset to false on this config so that
successive runs can reuse the same dataset.
Sourcepub fn maybe_cache(
self,
value: Option<CacheConfig>,
) -> BacktestEngineConfigBuilder<SetCache<S>>where
S::Cache: IsUnset,
pub fn maybe_cache(
self,
value: Option<CacheConfig>,
) -> BacktestEngineConfigBuilder<SetCache<S>>where
S::Cache: IsUnset,
Optional (Some / Option setters). The cache configuration.
crate::engine::BacktestEngine always overrides
drop_instruments_on_reset to false on this config so that
successive runs can reuse the same dataset.
Sourcepub fn msgbus(
self,
value: MessageBusConfig,
) -> BacktestEngineConfigBuilder<SetMsgbus<S>>where
S::Msgbus: IsUnset,
pub fn msgbus(
self,
value: MessageBusConfig,
) -> BacktestEngineConfigBuilder<SetMsgbus<S>>where
S::Msgbus: IsUnset,
Sourcepub fn maybe_msgbus(
self,
value: Option<MessageBusConfig>,
) -> BacktestEngineConfigBuilder<SetMsgbus<S>>where
S::Msgbus: IsUnset,
pub fn maybe_msgbus(
self,
value: Option<MessageBusConfig>,
) -> BacktestEngineConfigBuilder<SetMsgbus<S>>where
S::Msgbus: IsUnset,
Sourcepub fn data_engine(
self,
value: DataEngineConfig,
) -> BacktestEngineConfigBuilder<SetDataEngine<S>>where
S::DataEngine: IsUnset,
pub fn data_engine(
self,
value: DataEngineConfig,
) -> BacktestEngineConfigBuilder<SetDataEngine<S>>where
S::DataEngine: IsUnset,
Sourcepub fn maybe_data_engine(
self,
value: Option<DataEngineConfig>,
) -> BacktestEngineConfigBuilder<SetDataEngine<S>>where
S::DataEngine: IsUnset,
pub fn maybe_data_engine(
self,
value: Option<DataEngineConfig>,
) -> BacktestEngineConfigBuilder<SetDataEngine<S>>where
S::DataEngine: IsUnset,
Sourcepub fn risk_engine(
self,
value: RiskEngineConfig,
) -> BacktestEngineConfigBuilder<SetRiskEngine<S>>where
S::RiskEngine: IsUnset,
pub fn risk_engine(
self,
value: RiskEngineConfig,
) -> BacktestEngineConfigBuilder<SetRiskEngine<S>>where
S::RiskEngine: IsUnset,
Sourcepub fn maybe_risk_engine(
self,
value: Option<RiskEngineConfig>,
) -> BacktestEngineConfigBuilder<SetRiskEngine<S>>where
S::RiskEngine: IsUnset,
pub fn maybe_risk_engine(
self,
value: Option<RiskEngineConfig>,
) -> BacktestEngineConfigBuilder<SetRiskEngine<S>>where
S::RiskEngine: IsUnset,
Sourcepub fn exec_engine(
self,
value: ExecutionEngineConfig,
) -> BacktestEngineConfigBuilder<SetExecEngine<S>>where
S::ExecEngine: IsUnset,
pub fn exec_engine(
self,
value: ExecutionEngineConfig,
) -> BacktestEngineConfigBuilder<SetExecEngine<S>>where
S::ExecEngine: IsUnset,
Sourcepub fn maybe_exec_engine(
self,
value: Option<ExecutionEngineConfig>,
) -> BacktestEngineConfigBuilder<SetExecEngine<S>>where
S::ExecEngine: IsUnset,
pub fn maybe_exec_engine(
self,
value: Option<ExecutionEngineConfig>,
) -> BacktestEngineConfigBuilder<SetExecEngine<S>>where
S::ExecEngine: IsUnset,
Sourcepub fn portfolio(
self,
value: PortfolioConfig,
) -> BacktestEngineConfigBuilder<SetPortfolio<S>>where
S::Portfolio: IsUnset,
pub fn portfolio(
self,
value: PortfolioConfig,
) -> BacktestEngineConfigBuilder<SetPortfolio<S>>where
S::Portfolio: IsUnset,
Sourcepub fn maybe_portfolio(
self,
value: Option<PortfolioConfig>,
) -> BacktestEngineConfigBuilder<SetPortfolio<S>>where
S::Portfolio: IsUnset,
pub fn maybe_portfolio(
self,
value: Option<PortfolioConfig>,
) -> BacktestEngineConfigBuilder<SetPortfolio<S>>where
S::Portfolio: IsUnset,
Sourcepub fn streaming(
self,
value: StreamingConfig,
) -> BacktestEngineConfigBuilder<SetStreaming<S>>where
S::Streaming: IsUnset,
pub fn streaming(
self,
value: StreamingConfig,
) -> BacktestEngineConfigBuilder<SetStreaming<S>>where
S::Streaming: IsUnset,
Sourcepub fn maybe_streaming(
self,
value: Option<StreamingConfig>,
) -> BacktestEngineConfigBuilder<SetStreaming<S>>where
S::Streaming: IsUnset,
pub fn maybe_streaming(
self,
value: Option<StreamingConfig>,
) -> BacktestEngineConfigBuilder<SetStreaming<S>>where
S::Streaming: IsUnset,
Sourcepub fn bypass_logging(
self,
value: bool,
) -> BacktestEngineConfigBuilder<SetBypassLogging<S>>where
S::BypassLogging: IsUnset,
pub fn bypass_logging(
self,
value: bool,
) -> BacktestEngineConfigBuilder<SetBypassLogging<S>>where
S::BypassLogging: IsUnset,
Sourcepub fn maybe_bypass_logging(
self,
value: Option<bool>,
) -> BacktestEngineConfigBuilder<SetBypassLogging<S>>where
S::BypassLogging: IsUnset,
pub fn maybe_bypass_logging(
self,
value: Option<bool>,
) -> BacktestEngineConfigBuilder<SetBypassLogging<S>>where
S::BypassLogging: IsUnset,
Sourcepub fn run_analysis(
self,
value: bool,
) -> BacktestEngineConfigBuilder<SetRunAnalysis<S>>where
S::RunAnalysis: IsUnset,
pub fn run_analysis(
self,
value: bool,
) -> BacktestEngineConfigBuilder<SetRunAnalysis<S>>where
S::RunAnalysis: IsUnset,
Sourcepub fn maybe_run_analysis(
self,
value: Option<bool>,
) -> BacktestEngineConfigBuilder<SetRunAnalysis<S>>where
S::RunAnalysis: IsUnset,
pub fn maybe_run_analysis(
self,
value: Option<bool>,
) -> BacktestEngineConfigBuilder<SetRunAnalysis<S>>where
S::RunAnalysis: IsUnset,
Auto Trait Implementations§
impl<S> Freeze for BacktestEngineConfigBuilder<S>
impl<S> RefUnwindSafe for BacktestEngineConfigBuilder<S>
impl<S> Send for BacktestEngineConfigBuilder<S>
impl<S> Sync for BacktestEngineConfigBuilder<S>
impl<S> Unpin for BacktestEngineConfigBuilder<S>
impl<S> UnsafeUnpin for BacktestEngineConfigBuilder<S>
impl<S> UnwindSafe for BacktestEngineConfigBuilder<S>
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
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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 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>
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