Skip to main content

SessionConfig

Struct SessionConfig 

Source
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: CompId

Sender CompID (tag 49).

§target_comp_id: CompId

Target CompID (tag 56).

§begin_string: String

FIX version BeginString (e.g., “FIX.4.4”).

§heartbeat_interval: Duration

Heartbeat interval in seconds.

§reset_on_logon: bool

Whether to reset sequence numbers on logon.

§reset_on_logout: bool

Whether to reset sequence numbers on logout.

§reset_on_disconnect: bool

Whether to reset sequence numbers on disconnect.

§max_message_size: usize

Maximum message size in bytes.

§logon_timeout: Duration

Logon timeout duration.

§logout_timeout: Duration

Logout timeout duration.

§validate_checksum: bool

Whether to validate incoming message checksums.

§validate_length: bool

Whether 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

Source

pub fn new( sender_comp_id: CompId, target_comp_id: CompId, begin_string: impl Into<String>, ) -> Self

Creates a new session configuration with required fields.

§Arguments
  • sender_comp_id - The sender CompID
  • target_comp_id - The target CompID
  • begin_string - The FIX version string
Source

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

Sets the heartbeat interval.

Source

pub const fn with_reset_on_logon(self, reset: bool) -> Self

Sets whether to reset sequence numbers on logon.

Source

pub const fn with_max_message_size(self, size: usize) -> Self

Sets the maximum message size.

Source

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

Sets the logon timeout.

Source

pub fn with_sender_sub_id(self, sub_id: impl Into<String>) -> Self

Sets the sender sub ID.

Source

pub fn with_target_sub_id(self, sub_id: impl Into<String>) -> Self

Sets the target sub ID.

Source

pub fn heartbeat_interval_secs(&self) -> u64

Returns the heartbeat interval in seconds.

Trait Implementations§

Source§

impl Clone for SessionConfig

Source§

fn clone(&self) -> SessionConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for SessionConfig

Source§

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

Formats the value using the given formatter. Read more

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