Skip to main content

Crate easyfix_dictionary

Crate easyfix_dictionary 

Source
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 FixStr from a string literal.

Structs§

Component
Represents a reusable component in the FIX protocol.
Dictionary
The main dictionary representing a FIX protocol specification.
DictionaryBuilder
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, Copy newtype 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§

BasicType
Basic data types defined in the FIX protocol.
BuilderError
Errors related to dictionary builder configuration.
Error
Errors that can occur during dictionary operations.
MemberDefinition
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.
SessionProtocol
Which FIX protocol family a Version belongs to.
ValidationError
Errors related to dictionary structure and content validation.