Expand description
§easyfix-dictionary
A crate for parsing and representing FIX (Financial Information Exchange) protocol dictionaries.
This crate provides functionality to parse XML-based FIX protocol specifications into Rust structures. It supports different FIX protocol versions (FIX 4.0-5.0, FIXT1.1), component and group membership, field definitions with data types, and message specifications.
§Basic Usage
use easyfix_dictionary::{DictionaryBuilder, Version, fix_str};
use std::path::Path;
// Parse a standard FIX dictionary
let dictionary = DictionaryBuilder::new()
.with_fix_xml("path/to/FIX50SP2.xml")
.with_strict_check(true)
.build()
.expect("Failed to parse dictionary");
// Access field definitions
if let Some(field) = dictionary.field_by_name(fix_str!("BeginString")) {
println!("Field number: {}", field.number());
}
// Access message definitions
if let Some(message) = dictionary.message_by_name(fix_str!("Heartbeat")) {
println!("Message type: {}", message.msg_type());
}Macros§
- fix_str
- Builds a
&'static FixStrfrom a string literal.
Structs§
- Component
- Represents a reusable component in the FIX protocol.
- Dictionary
- The main dictionary representing a FIX protocol specification.
- Dictionary
Builder - Builder for creating and configuring FIX dictionaries.
- Field
- A field definition in the FIX dictionary.
- FixStr
- FixString
- Group
- Represents a repeating group in the FIX protocol.
- Member
- A member reference within a message, component, or group.
- Message
- Represents a FIX protocol message definition.
- MsgType
- Compact,
Copynewtype wrapping a validated MsgType raw value: 1-2 ASCII alphanumeric bytes, stored inline. - Variant
- An enumerated value variant for a FIX field.
- Version
- A specific version of the FIX protocol.
Enums§
- Basic
Type - Basic data types defined in the FIX protocol.
- Builder
Error - Errors related to dictionary builder configuration.
- Error
- Errors that can occur during dictionary operations.
- Member
Definition - The shared definition of a field, component, or group: what a member is, separate from how it is used.
- MsgCat
- Message category in the FIX protocol.
- Session
Protocol - Which FIX protocol family a
Versionbelongs to. - Validation
Error - Errors related to dictionary structure and content validation.