pub struct NautilusKernelBuilder { /* private fields */ }
Expand description
Builder for constructing a NautilusKernel
with a fluent API.
Provides a convenient way to configure and build a kernel instance with optional components and settings.
Implementations§
Source§impl NautilusKernelBuilder
impl NautilusKernelBuilder
Sourcepub const fn new(
name: String,
trader_id: TraderId,
environment: Environment,
) -> Self
pub const fn new( name: String, trader_id: TraderId, environment: Environment, ) -> Self
Creates a new NautilusKernelBuilder
with required parameters.
Sourcepub const fn with_instance_id(self, instance_id: UUID4) -> Self
pub const fn with_instance_id(self, instance_id: UUID4) -> Self
Set the instance ID for the kernel.
Sourcepub const fn with_load_state(self, load_state: bool) -> Self
pub const fn with_load_state(self, load_state: bool) -> Self
Configure whether to load state on startup.
Sourcepub const fn with_save_state(self, save_state: bool) -> Self
pub const fn with_save_state(self, save_state: bool) -> Self
Configure whether to save state on shutdown.
Sourcepub fn with_logging_config(self, config: LoggerConfig) -> Self
pub fn with_logging_config(self, config: LoggerConfig) -> Self
Set the logging configuration.
Sourcepub const fn with_timeout_connection(self, timeout: u32) -> Self
pub const fn with_timeout_connection(self, timeout: u32) -> Self
Set the connection timeout in seconds.
Sourcepub const fn with_timeout_reconciliation(self, timeout: u32) -> Self
pub const fn with_timeout_reconciliation(self, timeout: u32) -> Self
Set the reconciliation timeout in seconds.
Sourcepub const fn with_timeout_portfolio(self, timeout: u32) -> Self
pub const fn with_timeout_portfolio(self, timeout: u32) -> Self
Set the portfolio initialization timeout in seconds.
Sourcepub const fn with_timeout_disconnection(self, timeout: u32) -> Self
pub const fn with_timeout_disconnection(self, timeout: u32) -> Self
Set the disconnection timeout in seconds.
Sourcepub const fn with_timeout_post_stop(self, timeout: u32) -> Self
pub const fn with_timeout_post_stop(self, timeout: u32) -> Self
Set the post-stop timeout in seconds.
Sourcepub const fn with_timeout_shutdown(self, timeout: u32) -> Self
pub const fn with_timeout_shutdown(self, timeout: u32) -> Self
Set the shutdown timeout in seconds.
Sourcepub fn with_cache_config(self, config: CacheConfig) -> Self
pub fn with_cache_config(self, config: CacheConfig) -> Self
Set the cache configuration.
Sourcepub fn with_data_engine_config(self, config: DataEngineConfig) -> Self
pub fn with_data_engine_config(self, config: DataEngineConfig) -> Self
Set the data engine configuration.
Sourcepub fn with_risk_engine_config(self, config: RiskEngineConfig) -> Self
pub fn with_risk_engine_config(self, config: RiskEngineConfig) -> Self
Set the risk engine configuration.
Sourcepub const fn with_exec_engine_config(
self,
config: ExecutionEngineConfig,
) -> Self
pub const fn with_exec_engine_config( self, config: ExecutionEngineConfig, ) -> Self
Set the execution engine configuration.
Sourcepub const fn with_portfolio_config(self, config: PortfolioConfig) -> Self
pub const fn with_portfolio_config(self, config: PortfolioConfig) -> Self
Set the portfolio configuration.
Sourcepub fn build(self) -> Result<NautilusKernel>
pub fn build(self) -> Result<NautilusKernel>
Build the NautilusKernel
with the configured settings.
§Errors
Returns an error if kernel initialization fails.
Trait Implementations§
Source§impl Debug for NautilusKernelBuilder
impl Debug for NautilusKernelBuilder
Auto Trait Implementations§
impl Freeze for NautilusKernelBuilder
impl RefUnwindSafe for NautilusKernelBuilder
impl Send for NautilusKernelBuilder
impl Sync for NautilusKernelBuilder
impl Unpin for NautilusKernelBuilder
impl UnwindSafe for NautilusKernelBuilder
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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>
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