pub struct EngineBuilder<A = NoOpApplication>where
A: Application,{ /* private fields */ }Expand description
Builder for configuring a FIX engine.
Implementations§
Source§impl EngineBuilder
impl EngineBuilder
Sourcepub fn new() -> EngineBuilder
pub fn new() -> EngineBuilder
Creates a new engine builder with default settings.
Source§impl<A> EngineBuilder<A>where
A: Application,
impl<A> EngineBuilder<A>where
A: Application,
Sourcepub fn with_application<B>(self, application: B) -> EngineBuilder<B>where
B: Application,
pub fn with_application<B>(self, application: B) -> EngineBuilder<B>where
B: Application,
Sets the application callback handler.
Sourcepub fn add_session(self, config: SessionConfig) -> EngineBuilder<A>
pub fn add_session(self, config: SessionConfig) -> EngineBuilder<A>
Adds a session configuration.
Sourcepub const fn with_tls(self, enabled: bool) -> EngineBuilder<A>
pub const fn with_tls(self, enabled: bool) -> EngineBuilder<A>
Enables TLS for connections.
Sourcepub fn with_connect_timeout(self, timeout: Duration) -> EngineBuilder<A>
pub fn with_connect_timeout(self, timeout: Duration) -> EngineBuilder<A>
Sets the connection timeout.
Sourcepub fn with_reconnect_interval(self, interval: Duration) -> EngineBuilder<A>
pub fn with_reconnect_interval(self, interval: Duration) -> EngineBuilder<A>
Sets the reconnect interval.
Sourcepub const fn with_max_reconnect_attempts(
self,
attempts: u32,
) -> EngineBuilder<A>
pub const fn with_max_reconnect_attempts( self, attempts: u32, ) -> EngineBuilder<A>
Sets the maximum reconnect attempts.
Sourcepub fn sessions(&self) -> &[SessionConfig]
pub fn sessions(&self) -> &[SessionConfig]
Returns the configured sessions.
Sourcepub const fn connect_timeout(&self) -> Duration
pub const fn connect_timeout(&self) -> Duration
Returns the connection timeout.
Sourcepub const fn reconnect_interval(&self) -> Duration
pub const fn reconnect_interval(&self) -> Duration
Returns the reconnect interval.
Sourcepub const fn max_reconnect_attempts(&self) -> u32
pub const fn max_reconnect_attempts(&self) -> u32
Returns the maximum reconnect attempts.
Sourcepub fn application(&self) -> Arc<A>
pub fn application(&self) -> Arc<A>
Returns the application handler.
Trait Implementations§
Source§impl<A> Debug for EngineBuilder<A>where
A: Debug + Application,
impl<A> Debug for EngineBuilder<A>where
A: Debug + Application,
Source§impl Default for EngineBuilder
impl Default for EngineBuilder
Source§fn default() -> EngineBuilder
fn default() -> EngineBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<A> Freeze for EngineBuilder<A>
impl<A> RefUnwindSafe for EngineBuilder<A>where
A: RefUnwindSafe,
impl<A> Send for EngineBuilder<A>
impl<A> Sync for EngineBuilder<A>
impl<A> Unpin for EngineBuilder<A>
impl<A> UnwindSafe for EngineBuilder<A>where
A: RefUnwindSafe,
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