Skip to main content

DictionaryBuilder

Struct DictionaryBuilder 

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

Builder for creating and configuring FIX dictionaries.

This builder provides a fluent interface for configuring and creating a FIX protocol dictionary from XML specification files.

Implementations§

Source§

impl DictionaryBuilder

Source

pub fn new() -> DictionaryBuilder

Creates a new, empty DictionaryBuilder with default settings

Use the builder’s methods to configure and then call build() to create the dictionary.

Source

pub fn allow_custom_version(self, allow_custom_version: bool) -> Self

Sets whether to allow custom FIX versions not in the standard list

By default, only standard FIX versions are accepted.

Source

pub fn with_strict_check(self, strict_check: bool) -> Self

Sets whether to apply strict validation during dictionary parsing

When enabled, more rigorous checks are applied to the dictionary structure.

Source

pub fn with_fix_xml(self, path: impl Into<PathBuf>) -> Self

Adds a FIX application-level XML specification file to the builder

For FIX versions prior to 5.0, this is the only XML file needed. For FIX 5.0+, this should be used along with with_fixt_xml().

Source

pub fn with_fix_xmls(self, paths: impl IntoIterator<Item = PathBuf>) -> Self

Adds multiple FIX application-level XML specification files to the builder

This is useful when working with multiple FIX versions or custom extensions.

Source

pub fn with_fixt_xml(self, path: impl Into<PathBuf>) -> Self

Sets the FIXT transport layer XML specification file

This is required for FIX 5.0+ versions, which separate transport (FIXT) from application (FIX) layer specifications.

Source

pub fn flatten_components(self, flatten_components: bool) -> Self

Sets whether to flatten component hierarchies

When enabled, nested components are flattened into their parent containers. This simplifies the structure by removing intermediate component layers, resulting in direct field references in messages and groups.

For example, if Message A contains Component B which contains Field C, flattening would make Message A directly contain Field C. The resulting dictionary has no components left, so code generation never has to resolve one.

Source

pub fn build(self) -> Result<Dictionary, Error>

Builds the Dictionary from the configured sources

This method parses the XML files and constructs a complete FIX dictionary. It will return an error if the dictionary configuration is invalid or if parsing fails.

Trait Implementations§

Source§

impl Default for DictionaryBuilder

Source§

fn default() -> Self

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

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.