Expand description
§refix-dictionary
The FIX dictionary model for ReFIX, and a parser for QuickFIX XML dictionaries.
A Dictionary is resolved, so every reference in it is valid.
ReFIX is in early development, and APIs change between 0.x releases.
use refix_dictionary::dictionary::Member;
use refix_dictionary::quickfix;
fn main() {
let xml = "
<fix major='4' minor='4'>
<messages>
<message name='TestRequest' msgtype='1' msgcat='admin'>
<field name='TestReqID' required='Y'/>
</message>
</messages>
<fields>
<field number='112' name='TestReqID' type='STRING'/>
</fields>
</fix>";
let parsed = quickfix::parse(xml).unwrap();
for warning in &parsed.warnings {
println!("warning: {warning}");
}
for message in parsed.dictionary.messages() {
println!("{} (35={})", message.name(), message.msg_type());
for member in message.members() {
if let Member::Field { field, .. } = member {
println!(" {}", field.name);
}
}
}
}Components are expanded in place, so a message lists every field and group it can hold. refix-codegen generates typed
messages from a Dictionary, and refix-cli runs it from the command line.
§License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Re-exports§
pub use dictionary::Dictionary;
Modules§
- dictionary
- The validated, resolved form of a data dictionary.
- quickfix
Structs§
- Component
- A component definition, as listed in the dictionary’s components section.
- Component
Ref - A component as used by one message or component.
- Enum
Value - An enum variant’s value.
- Field
- A field definition, as listed in the dictionary’s fields section.
- Field
Ref - A field as used by one message or component (Orchestra’s
fieldRef). - Group
- A repeating group, declared inline in a message, component or group instance.
- Message
- The definition of a FIX message type.
- Spec
- The fields, messages, components, header and trailer of one FIX version or venue dialect, as authored.
- Tag
- A FIX tag number, e.g.
Tag(35)for MsgType. - Version
- The FIX version a dictionary describes, e.g. FIX 4.4 or FIXT 1.1.
Enums§
- Category
- Whether a message belongs to the session layer or the application layer.
- Data
Type - The FIX data type of a field, as declared in the dictionary.
- Member
- A member of a message, component or group instance.
- Member
Context - The message, component, group instance, header or trailer a member appears in.
- Protocol
- The protocol family a dictionary belongs to.