easyfix_dictionary/lib.rs
1//! # easyfix-dictionary
2//!
3//! A crate for parsing and representing FIX (Financial Information Exchange) protocol dictionaries.
4//!
5//! This crate provides functionality to parse XML-based FIX protocol specifications into Rust structures.
6//! It supports different FIX protocol versions (FIX 4.0-5.0, FIXT1.1), component and group membership,
7//! field definitions with data types, and message specifications.
8//!
9//! ## Basic Usage
10//!
11//! ```rust,no_run
12//! use easyfix_dictionary::{DictionaryBuilder, Version, fix_str};
13//! use std::path::Path;
14//!
15//! // Parse a standard FIX dictionary
16//! let dictionary = DictionaryBuilder::new()
17//! .with_fix_xml("path/to/FIX50SP2.xml")
18//! .with_strict_check(true)
19//! .build()
20//! .expect("Failed to parse dictionary");
21//!
22//! // Access field definitions
23//! if let Some(field) = dictionary.field_by_name(fix_str!("BeginString")) {
24//! println!("Field number: {}", field.number());
25//! }
26//!
27//! // Access message definitions
28//! if let Some(message) = dictionary.message_by_name(fix_str!("Heartbeat")) {
29//! println!("Message type: {}", message.msg_type());
30//! }
31//! ```
32
33mod dictionary;
34mod xml;
35
36pub use dictionary::{
37 BasicType, BuilderError, Component, Dictionary, DictionaryBuilder, Error, Field, Group, Member,
38 MemberDefinition, Message, MsgCat, MsgType, SessionProtocol, ValidationError, Variant, Version,
39};
40// The string types used across the dictionary API, re-exported so consumers
41// don't need a direct easyfix-core dependency to call lookups.
42pub use easyfix_core::{
43 basic_types::{FixStr, FixString},
44 fix_str,
45};