pub struct LiveNodeBuilder { /* private fields */ }
Expand description
Builder for constructing a LiveNode
with a fluent API.
Provides configuration options specific to live nodes, including client factory registration and timeout settings.
Implementations§
Source§impl LiveNodeBuilder
impl LiveNodeBuilder
Sourcepub fn new(
name: String,
trader_id: TraderId,
environment: Environment,
) -> Result<Self>
pub fn new( name: String, trader_id: TraderId, environment: Environment, ) -> Result<Self>
Creates a new LiveNodeBuilder
with required parameters.
§Errors
Returns an error if environment
is invalid (BACKTEST).
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 node.
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 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 add_data_client(
self,
name: Option<String>,
factory: Box<dyn DataClientFactory>,
config: Box<dyn ClientConfig>,
) -> Result<Self>
pub fn add_data_client( self, name: Option<String>, factory: Box<dyn DataClientFactory>, config: Box<dyn ClientConfig>, ) -> Result<Self>
Adds a data client with both factory and configuration.
§Errors
Returns an error if a client with the same name is already registered.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LiveNodeBuilder
impl !RefUnwindSafe for LiveNodeBuilder
impl Send for LiveNodeBuilder
impl Sync for LiveNodeBuilder
impl Unpin for LiveNodeBuilder
impl !UnwindSafe for LiveNodeBuilder
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
§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>
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