SessionSettingsBuilder

Struct SessionSettingsBuilder 

Source
pub struct SessionSettingsBuilder { /* private fields */ }
Expand description

A builder for easily configuring all the fields of a SessionSettings

The following settings are required to be set:

  • sender comp id
  • target comp id
  • addr
  • store path
  • log dir

Implementations§

Source§

impl SessionSettingsBuilder

Source

pub fn new() -> SessionSettingsBuilder

Source

pub fn with_start_time(self, start_time: NaiveTime) -> Self

The time the FIX session starts each day.

Source

pub fn set_start_time(&mut self, start_time: NaiveTime)

Source

pub fn with_sender_comp_id(self, sender_comp_id: &str) -> Self

The SenderCompID(49) that will be included in each message.

Source

pub fn set_sender_comp_id(&mut self, sender_comp_id: &str)

Source

pub fn with_target_comp_id(self, target_comp_id: &str) -> Self

The TargetCompID(56) that will be included in each message.

Source

pub fn set_target_comp_id(&mut self, target_comp_id: &str)

Source

pub fn with_socket_addr(self, addr: SocketAddr) -> Self

The address to initiate a connection to, or accept connections on.

Source

pub fn set_socket_addr(&mut self, addr: SocketAddr)

Source

pub fn with_begin_string(self, begin_string: &str) -> Self

The BeginString(8) that will be included in each message.

Source

pub fn set_begin_string(&mut self, begin_string: &str)

Source

pub fn with_epoch(self, epoch: &str) -> Self

A local unique identifier for this FIX session.

Source

pub fn set_epoch(&mut self, epoch: &str)

Source

pub fn with_store_path(self, store_path: PathBuf) -> Self

The file that should be used as the sqlite database file.

Source

pub fn set_store_path(&mut self, store_path: PathBuf)

Source

pub fn with_log_dir(self, log_dir: PathBuf) -> Self

The directory that should be used to create log files.

Source

pub fn set_log_dir(&mut self, log_dir: PathBuf)

Source

pub fn with_heartbeat_timeout(self, hb_timeout: Duration) -> Self

The timeout length used for sending Heartbeat<0> messages.

Source

pub fn set_heartbeat_timeout(&mut self, hb_timeout: Duration)

Source

pub fn build(self) -> Result<SessionSettings, ApplicationError>

Build the SessionSettings struct.

Returns an Err(ApplicationError::SettingRequired) if not all of the required fields were set.

Trait Implementations§

Source§

impl Default for SessionSettingsBuilder

Source§

fn default() -> SessionSettingsBuilder

Returns the “default value” for a type. 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> 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.