pub struct BotConfigBuilder { /* private fields */ }Expand description
Builder for BotConfig.
Implementations§
Source§impl BotConfigBuilder
impl BotConfigBuilder
Sourcepub fn name(self, name: impl Into<String>) -> Self
pub fn name(self, name: impl Into<String>) -> Self
Human-readable bot name (logs, supervisor identification). Required.
Sourcepub fn symbol(self, sym: impl Into<Symbol>) -> Self
pub fn symbol(self, sym: impl Into<Symbol>) -> Self
Add a single symbol. Repeated calls accumulate.
Sourcepub fn symbols<I, S>(self, syms: I) -> Self
pub fn symbols<I, S>(self, syms: I) -> Self
Add many symbols at once. Repeated calls accumulate.
Sourcepub fn shutdown_timeout(self, dur: Duration) -> Self
pub fn shutdown_timeout(self, dur: Duration) -> Self
Maximum time to wait for services to drain on shutdown.
Sourcepub fn without_signal_handler(self) -> Self
pub fn without_signal_handler(self) -> Self
Disable the supervisor’s signal handler — host drives shutdown.
Sourcepub fn market_bus_capacity(self, cap: usize) -> Self
pub fn market_bus_capacity(self, cap: usize) -> Self
Override the in-process market-data bus capacity (default 1024).
Sourcepub fn signal_bus_capacity(self, cap: usize) -> Self
pub fn signal_bus_capacity(self, cap: usize) -> Self
Override the in-process signal-bus capacity (default 256).
Sourcepub fn close_positions_on_shutdown(self, b: bool) -> Self
pub fn close_positions_on_shutdown(self, b: bool) -> Self
Enable best-effort exchange.close_position for non-flat positions
after the supervisor drains.
Sourcepub fn session_pnl_config(self, cfg: SessionPnlConfig) -> Self
pub fn session_pnl_config(self, cfg: SessionPnlConfig) -> Self
Override the session-PnL config used for every symbol.
Sourcepub fn circuit_breaker_config(self, cfg: CircuitBreakerConfig) -> Self
pub fn circuit_breaker_config(self, cfg: CircuitBreakerConfig) -> Self
Override the circuit-breaker config used for every symbol.
Sourcepub fn sizing_config(self, cfg: SizingConfig) -> Self
pub fn sizing_config(self, cfg: SizingConfig) -> Self
Override the position-sizing config used for every symbol.
Trait Implementations§
Source§impl Clone for BotConfigBuilder
impl Clone for BotConfigBuilder
Source§fn clone(&self) -> BotConfigBuilder
fn clone(&self) -> BotConfigBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BotConfigBuilder
impl Debug for BotConfigBuilder
Source§impl Default for BotConfigBuilder
impl Default for BotConfigBuilder
Source§fn default() -> BotConfigBuilder
fn default() -> BotConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BotConfigBuilder
impl RefUnwindSafe for BotConfigBuilder
impl Send for BotConfigBuilder
impl Sync for BotConfigBuilder
impl Unpin for BotConfigBuilder
impl UnsafeUnpin for BotConfigBuilder
impl UnwindSafe for BotConfigBuilder
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