pub struct PortfolioConfigBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build_inner().
Implementations§
Source§impl<S: State> PortfolioConfigBuilder<S>
impl<S: State> PortfolioConfigBuilder<S>
Sourcepub fn use_mark_prices(
self,
value: bool,
) -> PortfolioConfigBuilder<SetUseMarkPrices<S>>where
S::UseMarkPrices: IsUnset,
pub fn use_mark_prices(
self,
value: bool,
) -> PortfolioConfigBuilder<SetUseMarkPrices<S>>where
S::UseMarkPrices: IsUnset,
Sourcepub fn maybe_use_mark_prices(
self,
value: Option<bool>,
) -> PortfolioConfigBuilder<SetUseMarkPrices<S>>where
S::UseMarkPrices: IsUnset,
pub fn maybe_use_mark_prices(
self,
value: Option<bool>,
) -> PortfolioConfigBuilder<SetUseMarkPrices<S>>where
S::UseMarkPrices: IsUnset,
Sourcepub fn use_mark_xrates(
self,
value: bool,
) -> PortfolioConfigBuilder<SetUseMarkXrates<S>>where
S::UseMarkXrates: IsUnset,
pub fn use_mark_xrates(
self,
value: bool,
) -> PortfolioConfigBuilder<SetUseMarkXrates<S>>where
S::UseMarkXrates: IsUnset,
Sourcepub fn maybe_use_mark_xrates(
self,
value: Option<bool>,
) -> PortfolioConfigBuilder<SetUseMarkXrates<S>>where
S::UseMarkXrates: IsUnset,
pub fn maybe_use_mark_xrates(
self,
value: Option<bool>,
) -> PortfolioConfigBuilder<SetUseMarkXrates<S>>where
S::UseMarkXrates: IsUnset,
Sourcepub fn bar_updates(
self,
value: bool,
) -> PortfolioConfigBuilder<SetBarUpdates<S>>where
S::BarUpdates: IsUnset,
pub fn bar_updates(
self,
value: bool,
) -> PortfolioConfigBuilder<SetBarUpdates<S>>where
S::BarUpdates: IsUnset,
Sourcepub fn maybe_bar_updates(
self,
value: Option<bool>,
) -> PortfolioConfigBuilder<SetBarUpdates<S>>where
S::BarUpdates: IsUnset,
pub fn maybe_bar_updates(
self,
value: Option<bool>,
) -> PortfolioConfigBuilder<SetBarUpdates<S>>where
S::BarUpdates: IsUnset,
Sourcepub fn convert_to_account_base_currency(
self,
value: bool,
) -> PortfolioConfigBuilder<SetConvertToAccountBaseCurrency<S>>where
S::ConvertToAccountBaseCurrency: IsUnset,
pub fn convert_to_account_base_currency(
self,
value: bool,
) -> PortfolioConfigBuilder<SetConvertToAccountBaseCurrency<S>>where
S::ConvertToAccountBaseCurrency: IsUnset,
Sourcepub fn maybe_convert_to_account_base_currency(
self,
value: Option<bool>,
) -> PortfolioConfigBuilder<SetConvertToAccountBaseCurrency<S>>where
S::ConvertToAccountBaseCurrency: IsUnset,
pub fn maybe_convert_to_account_base_currency(
self,
value: Option<bool>,
) -> PortfolioConfigBuilder<SetConvertToAccountBaseCurrency<S>>where
S::ConvertToAccountBaseCurrency: IsUnset,
Sourcepub fn min_account_state_logging_interval_ms(
self,
value: u64,
) -> PortfolioConfigBuilder<SetMinAccountStateLoggingIntervalMs<S>>where
S::MinAccountStateLoggingIntervalMs: IsUnset,
pub fn min_account_state_logging_interval_ms(
self,
value: u64,
) -> PortfolioConfigBuilder<SetMinAccountStateLoggingIntervalMs<S>>where
S::MinAccountStateLoggingIntervalMs: IsUnset,
Optional (Some / Option setters). The minimum interval (milliseconds) between logging account state events for the same account. When set, account state updates will only be logged if this much time has passed since the last log. Useful for HFT deployments to prevent excessive logging when account states change rapidly.
Sourcepub fn maybe_min_account_state_logging_interval_ms(
self,
value: Option<u64>,
) -> PortfolioConfigBuilder<SetMinAccountStateLoggingIntervalMs<S>>where
S::MinAccountStateLoggingIntervalMs: IsUnset,
pub fn maybe_min_account_state_logging_interval_ms(
self,
value: Option<u64>,
) -> PortfolioConfigBuilder<SetMinAccountStateLoggingIntervalMs<S>>where
S::MinAccountStateLoggingIntervalMs: IsUnset,
Optional (Some / Option setters). The minimum interval (milliseconds) between logging account state events for the same account. When set, account state updates will only be logged if this much time has passed since the last log. Useful for HFT deployments to prevent excessive logging when account states change rapidly.
Sourcepub fn snapshot_interval_ms(
self,
value: u64,
) -> PortfolioConfigBuilder<SetSnapshotIntervalMs<S>>where
S::SnapshotIntervalMs: IsUnset,
pub fn snapshot_interval_ms(
self,
value: u64,
) -> PortfolioConfigBuilder<SetSnapshotIntervalMs<S>>where
S::SnapshotIntervalMs: IsUnset,
Optional (Some / Option setters).
The interval (milliseconds) between portfolio snapshot emissions per account.
When set, a PortfolioSnapshot is emitted at this cadence while the
account holds at least one open position, carrying continuous
mark-to-market equity. When None (the default), no periodic snapshots
are emitted.
Sourcepub fn maybe_snapshot_interval_ms(
self,
value: Option<u64>,
) -> PortfolioConfigBuilder<SetSnapshotIntervalMs<S>>where
S::SnapshotIntervalMs: IsUnset,
pub fn maybe_snapshot_interval_ms(
self,
value: Option<u64>,
) -> PortfolioConfigBuilder<SetSnapshotIntervalMs<S>>where
S::SnapshotIntervalMs: IsUnset,
Optional (Some / Option setters).
The interval (milliseconds) between portfolio snapshot emissions per account.
When set, a PortfolioSnapshot is emitted at this cadence while the
account holds at least one open position, carrying continuous
mark-to-market equity. When None (the default), no periodic snapshots
are emitted.
Sourcepub fn debug(self, value: bool) -> PortfolioConfigBuilder<SetDebug<S>>where
S::Debug: IsUnset,
pub fn debug(self, value: bool) -> PortfolioConfigBuilder<SetDebug<S>>where
S::Debug: IsUnset,
Sourcepub fn maybe_debug(
self,
value: Option<bool>,
) -> PortfolioConfigBuilder<SetDebug<S>>where
S::Debug: IsUnset,
pub fn maybe_debug(
self,
value: Option<bool>,
) -> PortfolioConfigBuilder<SetDebug<S>>where
S::Debug: IsUnset,
Source§impl<S: IsComplete> PortfolioConfigBuilder<S>
impl<S: IsComplete> PortfolioConfigBuilder<S>
Sourcepub fn build(self) -> ConfigResult<PortfolioConfig>
pub fn build(self) -> ConfigResult<PortfolioConfig>
Validates and builds the PortfolioConfig.
§Errors
Returns a [ConfigError] if any field fails validation
(see PortfolioConfig::validate).