pub struct SessionConfig {Show 16 fields
pub sender_comp_id: CompId,
pub target_comp_id: CompId,
pub begin_string: String,
pub heartbeat_interval: Duration,
pub reset_on_logon: bool,
pub reset_on_logout: bool,
pub reset_on_disconnect: bool,
pub max_message_size: usize,
pub logon_timeout: Duration,
pub logout_timeout: Duration,
pub validate_checksum: bool,
pub validate_length: bool,
pub sender_sub_id: Option<String>,
pub target_sub_id: Option<String>,
pub sender_location_id: Option<String>,
pub target_location_id: Option<String>,
}Expand description
Configuration for a FIX session.
Fields§
§sender_comp_id: CompIdSender CompID (tag 49).
target_comp_id: CompIdTarget CompID (tag 56).
begin_string: StringFIX version BeginString (e.g., “FIX.4.4”).
heartbeat_interval: DurationHeartbeat interval in seconds.
reset_on_logon: boolWhether to reset sequence numbers on logon.
reset_on_logout: boolWhether to reset sequence numbers on logout.
reset_on_disconnect: boolWhether to reset sequence numbers on disconnect.
max_message_size: usizeMaximum message size in bytes.
logon_timeout: DurationLogon timeout duration.
logout_timeout: DurationLogout timeout duration.
validate_checksum: boolWhether to validate incoming message checksums.
validate_length: boolWhether to validate incoming message length.
sender_sub_id: Option<String>Optional sender sub ID (tag 50).
target_sub_id: Option<String>Optional target sub ID (tag 57).
sender_location_id: Option<String>Optional sender location ID (tag 142).
target_location_id: Option<String>Optional target location ID (tag 143).
Implementations§
Source§impl SessionConfig
impl SessionConfig
Sourcepub fn new(
sender_comp_id: CompId,
target_comp_id: CompId,
begin_string: impl Into<String>,
) -> SessionConfig
pub fn new( sender_comp_id: CompId, target_comp_id: CompId, begin_string: impl Into<String>, ) -> SessionConfig
Creates a new session configuration with required fields.
§Arguments
sender_comp_id- The sender CompIDtarget_comp_id- The target CompIDbegin_string- The FIX version string
Sourcepub fn with_heartbeat_interval(self, interval: Duration) -> SessionConfig
pub fn with_heartbeat_interval(self, interval: Duration) -> SessionConfig
Sets the heartbeat interval.
Sourcepub const fn with_reset_on_logon(self, reset: bool) -> SessionConfig
pub const fn with_reset_on_logon(self, reset: bool) -> SessionConfig
Sets whether to reset sequence numbers on logon.
Sourcepub const fn with_max_message_size(self, size: usize) -> SessionConfig
pub const fn with_max_message_size(self, size: usize) -> SessionConfig
Sets the maximum message size.
Sourcepub fn with_logon_timeout(self, timeout: Duration) -> SessionConfig
pub fn with_logon_timeout(self, timeout: Duration) -> SessionConfig
Sets the logon timeout.
Sourcepub fn with_sender_sub_id(self, sub_id: impl Into<String>) -> SessionConfig
pub fn with_sender_sub_id(self, sub_id: impl Into<String>) -> SessionConfig
Sets the sender sub ID.
Sourcepub fn with_target_sub_id(self, sub_id: impl Into<String>) -> SessionConfig
pub fn with_target_sub_id(self, sub_id: impl Into<String>) -> SessionConfig
Sets the target sub ID.
Sourcepub fn heartbeat_interval_secs(&self) -> u64
pub fn heartbeat_interval_secs(&self) -> u64
Returns the heartbeat interval in seconds.
Trait Implementations§
Source§impl Clone for SessionConfig
impl Clone for SessionConfig
Source§fn clone(&self) -> SessionConfig
fn clone(&self) -> SessionConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more