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_secs: u64) -> Self
pub const fn with_timeout_connection(self, timeout_secs: u64) -> Self
Set the connection timeout in seconds.
Sourcepub const fn with_timeout_reconciliation(self, timeout_secs: u64) -> Self
pub const fn with_timeout_reconciliation(self, timeout_secs: u64) -> Self
Set the reconciliation timeout in seconds.
Sourcepub const fn with_timeout_portfolio(self, timeout_secs: u64) -> Self
pub const fn with_timeout_portfolio(self, timeout_secs: u64) -> Self
Set the portfolio initialization timeout in seconds.
Sourcepub const fn with_timeout_disconnection_secs(self, timeout_secs: u64) -> Self
pub const fn with_timeout_disconnection_secs(self, timeout_secs: u64) -> Self
Set the disconnection timeout in seconds.
Sourcepub const fn with_delay_post_stop_secs(self, delay_secs: u64) -> Self
pub const fn with_delay_post_stop_secs(self, delay_secs: u64) -> Self
Set the post-stop delay in seconds.
Sourcepub const fn with_delay_shutdown_secs(self, delay_secs: u64) -> Self
pub const fn with_delay_shutdown_secs(self, delay_secs: u64) -> 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 factory and configuration.
§Errors
Returns an error if a client with the same name is already registered.
Sourcepub fn add_exec_client(
self,
name: Option<String>,
factory: Box<dyn ExecutionClientFactory>,
config: Box<dyn ClientConfig>,
) -> Result<Self>
pub fn add_exec_client( self, name: Option<String>, factory: Box<dyn ExecutionClientFactory>, config: Box<dyn ClientConfig>, ) -> Result<Self>
Adds an execution client with factory and configuration.
§Errors
Returns an error if a client with the same name is already registered.
Trait Implementations§
Source§impl Debug for LiveNodeBuilder
impl Debug for LiveNodeBuilder
Source§impl<'py> IntoPyObject<'py> for LiveNodeBuilder
impl<'py> IntoPyObject<'py> for LiveNodeBuilder
Source§type Target = LiveNodeBuilder
type Target = LiveNodeBuilder
Source§type Output = Bound<'py, <LiveNodeBuilder as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <LiveNodeBuilder as IntoPyObject<'py>>::Target>
Source§fn into_pyobject(
self,
py: Python<'py>,
) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
fn into_pyobject( self, py: Python<'py>, ) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
Source§impl PyClass for LiveNodeBuilder
impl PyClass for LiveNodeBuilder
Source§impl PyClassImpl for LiveNodeBuilder
impl PyClassImpl for LiveNodeBuilder
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
Source§const IS_IMMUTABLE_TYPE: bool = false
const IS_IMMUTABLE_TYPE: bool = false
Source§type ThreadChecker = ThreadCheckerImpl
type ThreadChecker = ThreadCheckerImpl
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
PyAny
by default, and when you declare
#[pyclass(extends=PyDict)]
, it’s PyDict
.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
Source§impl<'a, 'py> PyFunctionArgument<'a, 'py, false> for &'a LiveNodeBuilder
impl<'a, 'py> PyFunctionArgument<'a, 'py, false> for &'a LiveNodeBuilder
Source§impl<'a, 'py> PyFunctionArgument<'a, 'py, false> for &'a mut LiveNodeBuilder
impl<'a, 'py> PyFunctionArgument<'a, 'py, false> for &'a mut LiveNodeBuilder
Source§impl PyTypeInfo for LiveNodeBuilder
impl PyTypeInfo for LiveNodeBuilder
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
§fn is_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_type_of(object: &Bound<'_, PyAny>) -> bool
object
is an instance of this type or a subclass of this type.§fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
object
is an instance of this type.impl DerefToPyAny for LiveNodeBuilder
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§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
self
into an owned Python object, dropping type information.§fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
self
into an owned Python object, dropping type information and unbinding it
from the 'py
lifetime.§fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
self
into a Python object. Read more