Struct Config

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

A struct that has settable fields and implements Configure.

When using Config, you have full control over all FIX configuration options offered by fefix. The documentation of Configure goes into detail about the reasons why you might want to use something other than Config.

Implementations§

Source§

impl Config

Source

pub fn set_separator(&mut self, separator: u8)

Changes the field separator character. It is SOH (ASCII 0x1) by default. This also disables checksum verification for decode operations to avoid checksum issues if not SOH.

§Examples
use fefix::tagvalue::{Config, Configure};

let config = &mut Config::default();
assert_eq!(config.separator(), 0x1);
config.set_separator(b'|');
assert_eq!(config.separator(), b'|');
Source

pub fn set_max_message_size(&mut self, max_message_size: Option<usize>)

Changes the value of Configure::max_message_size.

Source

pub fn set_verify_checksum(&mut self, verify: bool)

Turns on or off CheckSum <10> verification. On by default.

§Examples
use fefix::tagvalue::{Config, Configure};

let config = &mut Config::default();
assert_eq!(config.verify_checksum(), true);
config.set_verify_checksum(false);
assert_eq!(config.verify_checksum(), false);
Source

pub fn set_decode_assoc(&mut self, should: bool)

Enables or disables random access of fields within a Message. When this setting is turned off fields can only be accessed iteratively.

Enabled by default.

Trait Implementations§

Source§

impl Clone for Config

Source§

fn clone(&self) -> Config

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 Configure for Config

Source§

fn separator(&self) -> u8

The delimiter character, which terminates every tag-value pair including the last one. Read more
Source§

fn verify_checksum(&self) -> bool

Determines wheather or not CheckSum(10) should be verified. Read more
Source§

fn max_message_size(&self) -> Option<usize>

The maximum allowed size for any single FIX message. No restrictions are imposed when it is None.
Source§

fn should_decode_associative(&self) -> bool

Determines whether or not the decoder needs to have access to associative FIX fields. If turned off, only linear access is possible.
Source§

impl Debug for Config

Source§

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

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

impl Default for Config

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Copy for Config

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

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.
Source§

impl<T> SendSyncUnwindSafe for T
where T: Send + Sync + UnwindSafe + ?Sized,