Skip to main content

FixSessionEngineConfig

Struct FixSessionEngineConfig 

Source
#[non_exhaustive]
pub struct FixSessionEngineConfig { /* private fields */ }
Expand description

Configuration for a deterministic FIX session engine.

The engine owns protocol state but not a socket, TLS implementation, clock, scheduler, or persistence backend. Hosts inject timestamps and transmit the caller-owned output buffer returned by each action.

Implementations§

Source§

impl FixSessionEngineConfig

Source

pub fn new(heartbeat_interval_secs: u32) -> Result<Self, FixSessionConfigError>

Creates a session configuration from the negotiated heartbeat interval.

By default the engine sends a TestRequest after 1.5 heartbeat intervals without inbound traffic and requests disconnect one heartbeat interval after an unanswered TestRequest. Logout uses the same one-heartbeat timeout.

§Errors

Returns FixSessionConfigError when the interval is zero or cannot be represented in nanoseconds.

Source

pub fn with_timeouts( self, test_request_after_ns: u64, disconnect_after_test_request_ns: u64, logout_timeout_ns: u64, ) -> Result<Self, FixSessionConfigError>

Overrides liveness and logout durations in nanoseconds.

test_request_after_ns is measured from the latest inbound frame. disconnect_after_test_request_ns is measured from the TestRequest send time. All durations must be non-zero.

§Errors

Returns FixSessionConfigError when any duration is zero.

Source

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

Configures whether the next connection sends ResetSeqNumFlag(141)=Y.

When enabled, both local counters are reset to one immediately before the Logon sequence is assigned. This must only be enabled under an explicit bilateral session-reset agreement.

Source

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

Configures strict sender/target component-id validation.

Validation is enabled by default. Disabling it is intended only for gateways whose authenticated transport rewrites component identifiers.

Source

pub const fn heartbeat_interval_secs(&self) -> u32

Returns the negotiated HeartBtInt(108) value in seconds.

Source

pub const fn heartbeat_interval_ns(&self) -> u64

Returns the outbound-heartbeat idle duration in nanoseconds.

Source

pub const fn test_request_after_ns(&self) -> u64

Returns the inbound-idle duration before a TestRequest is sent.

Source

pub const fn disconnect_after_test_request_ns(&self) -> u64

Returns the unanswered-TestRequest duration before disconnect is requested.

Source

pub const fn logout_timeout_ns(&self) -> u64

Returns the Logout response timeout in nanoseconds.

Source

pub const fn reset_seq_num_on_logon(&self) -> bool

Returns whether Logon requests a bilateral sequence reset.

Source

pub const fn validate_comp_ids(&self) -> bool

Returns whether inbound component identifiers are validated.

Trait Implementations§

Source§

impl Clone for FixSessionEngineConfig

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for FixSessionEngineConfig

Source§

impl Debug for FixSessionEngineConfig

Source§

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

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

impl Eq for FixSessionEngineConfig

Source§

impl PartialEq for FixSessionEngineConfig

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for FixSessionEngineConfig

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.