Struct NautilusKernelBuilder

Source
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

Source

pub const fn new( name: String, trader_id: TraderId, environment: Environment, ) -> Self

Creates a new NautilusKernelBuilder with required parameters.

Source

pub const fn with_instance_id(self, instance_id: UUID4) -> Self

Set the instance ID for the kernel.

Source

pub const fn with_load_state(self, load_state: bool) -> Self

Configure whether to load state on startup.

Source

pub const fn with_save_state(self, save_state: bool) -> Self

Configure whether to save state on shutdown.

Source

pub fn with_logging_config(self, config: LoggerConfig) -> Self

Set the logging configuration.

Source

pub const fn with_timeout_connection(self, timeout: u32) -> Self

Set the connection timeout in seconds.

Source

pub const fn with_timeout_reconciliation(self, timeout: u32) -> Self

Set the reconciliation timeout in seconds.

Source

pub const fn with_timeout_portfolio(self, timeout: u32) -> Self

Set the portfolio initialization timeout in seconds.

Source

pub const fn with_timeout_disconnection(self, timeout: u32) -> Self

Set the disconnection timeout in seconds.

Source

pub const fn with_timeout_post_stop(self, timeout: u32) -> Self

Set the post-stop timeout in seconds.

Source

pub const fn with_timeout_shutdown(self, timeout: u32) -> Self

Set the shutdown timeout in seconds.

Source

pub fn with_cache_config(self, config: CacheConfig) -> Self

Set the cache configuration.

Source

pub fn with_data_engine_config(self, config: DataEngineConfig) -> Self

Set the data engine configuration.

Source

pub fn with_risk_engine_config(self, config: RiskEngineConfig) -> Self

Set the risk engine configuration.

Source

pub const fn with_exec_engine_config( self, config: ExecutionEngineConfig, ) -> Self

Set the execution engine configuration.

Source

pub const fn with_portfolio_config(self, config: PortfolioConfig) -> Self

Set the portfolio configuration.

Source

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

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for NautilusKernelBuilder

Source§

fn default() -> Self

Create a default builder with minimal configuration for testing/development.

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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
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,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> Ungil for T
where T: Send,