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
impl SessionSettingsBuilder
pub fn new() -> SessionSettingsBuilder
Sourcepub fn with_start_time(self, start_time: NaiveTime) -> Self
pub fn with_start_time(self, start_time: NaiveTime) -> Self
The time the FIX session starts each day.
pub fn set_start_time(&mut self, start_time: NaiveTime)
Sourcepub fn with_sender_comp_id(self, sender_comp_id: &str) -> Self
pub fn with_sender_comp_id(self, sender_comp_id: &str) -> Self
The SenderCompID(49) that will be included in each message.
pub fn set_sender_comp_id(&mut self, sender_comp_id: &str)
Sourcepub fn with_target_comp_id(self, target_comp_id: &str) -> Self
pub fn with_target_comp_id(self, target_comp_id: &str) -> Self
The TargetCompID(56) that will be included in each message.
pub fn set_target_comp_id(&mut self, target_comp_id: &str)
Sourcepub fn with_socket_addr(self, addr: SocketAddr) -> Self
pub fn with_socket_addr(self, addr: SocketAddr) -> Self
The address to initiate a connection to, or accept connections on.
pub fn set_socket_addr(&mut self, addr: SocketAddr)
Sourcepub fn with_begin_string(self, begin_string: &str) -> Self
pub fn with_begin_string(self, begin_string: &str) -> Self
The BeginString(8) that will be included in each message.
pub fn set_begin_string(&mut self, begin_string: &str)
Sourcepub fn with_epoch(self, epoch: &str) -> Self
pub fn with_epoch(self, epoch: &str) -> Self
A local unique identifier for this FIX session.
pub fn set_epoch(&mut self, epoch: &str)
Sourcepub fn with_store_path(self, store_path: PathBuf) -> Self
pub fn with_store_path(self, store_path: PathBuf) -> Self
The file that should be used as the sqlite database file.
pub fn set_store_path(&mut self, store_path: PathBuf)
Sourcepub fn with_log_dir(self, log_dir: PathBuf) -> Self
pub fn with_log_dir(self, log_dir: PathBuf) -> Self
The directory that should be used to create log files.
pub fn set_log_dir(&mut self, log_dir: PathBuf)
Sourcepub fn with_heartbeat_timeout(self, hb_timeout: Duration) -> Self
pub fn with_heartbeat_timeout(self, hb_timeout: Duration) -> Self
The timeout length used for sending Heartbeat<0> messages.
pub fn set_heartbeat_timeout(&mut self, hb_timeout: Duration)
Sourcepub fn build(self) -> Result<SessionSettings, ApplicationError>
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
impl Default for SessionSettingsBuilder
Source§fn default() -> SessionSettingsBuilder
fn default() -> SessionSettingsBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SessionSettingsBuilder
impl RefUnwindSafe for SessionSettingsBuilder
impl Send for SessionSettingsBuilder
impl Sync for SessionSettingsBuilder
impl Unpin for SessionSettingsBuilder
impl UnwindSafe for SessionSettingsBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more