Skip to main content

EngineBuilder

Struct EngineBuilder 

Source
pub struct EngineBuilder<A: Application = NoOpApplication> { /* private fields */ }
Expand description

Builder for configuring a FIX engine.

Implementations§

Source§

impl EngineBuilder<NoOpApplication>

Source

pub fn new() -> Self

Creates a new engine builder with default settings.

Source§

impl<A: Application> EngineBuilder<A>

Source

pub fn with_application<B: Application>( self, application: B, ) -> EngineBuilder<B>

Sets the application callback handler.

Source

pub fn add_session(self, config: SessionConfig) -> Self

Adds a session configuration.

Source

pub const fn with_tls(self, enabled: bool) -> Self

Enables TLS for connections.

Source

pub fn with_connect_timeout(self, timeout: Duration) -> Self

Sets the connection timeout.

Source

pub fn with_reconnect_interval(self, interval: Duration) -> Self

Sets the reconnect interval.

Source

pub const fn with_max_reconnect_attempts(self, attempts: u32) -> Self

Sets the maximum reconnect attempts.

Source

pub fn sessions(&self) -> &[SessionConfig]

Returns the configured sessions.

Source

pub const fn use_tls(&self) -> bool

Returns whether TLS is enabled.

Source

pub const fn connect_timeout(&self) -> Duration

Returns the connection timeout.

Source

pub const fn reconnect_interval(&self) -> Duration

Returns the reconnect interval.

Source

pub const fn max_reconnect_attempts(&self) -> u32

Returns the maximum reconnect attempts.

Source

pub fn application(&self) -> Arc<A>

Returns the application handler.

Trait Implementations§

Source§

impl<A: Debug + Application> Debug for EngineBuilder<A>

Source§

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

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

impl Default for EngineBuilder<NoOpApplication>

Source§

fn default() -> Self

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