Struct fefix::Dictionary [−][src]
pub struct Dictionary { /* fields omitted */ }
Expand description
Specifies business semantics for application-level entities within the FIX Protocol.
You can rely on Dictionary
for accessing details about
fields, messages, and other abstract entities as defined in the FIX
specifications. Examples of such information include:
- The mapping of FIX field names to numeric tags (e.g.
BeginString
is 8). - Which FIX fields are mandatory and which are optional.
- The data type of each and every FIX field.
- What fields to expect in FIX headers.
N.B. The FIX Protocol mandates separation of concerns between session and application protocol only for FIX 5.0 and subsequent versions. All FIX Dictionaries for older versions will also contain information about the session layer.
Implementations
Attempts to read a QuickFIX-style specification file and convert it into
a Dictionary
.
Returns the version string associated with this Dictionary
(e.g.
FIXT.1.1
, FIX.4.2
).
use fefix::Dictionary;
let dict = Dictionary::fix44();
assert_eq!(dict.get_version(), "FIX.4.4");
This is supported on crate feature fix40
only.
fix40
only.Creates a new Dictionary
for FIX 4.0.
This is supported on crate feature fix41
only.
fix41
only.Creates a new Dictionary
for FIX 4.1.
This is supported on crate feature fix42
only.
fix42
only.Creates a new Dictionary
for FIX 4.2.
This is supported on crate feature fix43
only.
fix43
only.Creates a new Dictionary
for FIX 4.3.
Creates a new Dictionary
for FIX 4.4.
This is supported on crate feature fix50
only.
fix50
only.Creates a new Dictionary
for FIX 5.0.
This is supported on crate feature fix50sp1
only.
fix50sp1
only.Creates a new Dictionary
for FIX 5.0 SP1.
This is supported on crate feature fix50sp1
only.
fix50sp1
only.Creates a new Dictionary
for FIX 5.0 SP2.
This is supported on crate feature fixt11
only.
fixt11
only.Creates a new Dictionary
for FIXT 1.1.
Return the known abbreviation for term
-if any- according to the
documentation of this FIX Dictionary.
Returns the Message
associated with name
, if any.
use fefix::Dictionary;
let dict = Dictionary::fix44();
let msg1 = dict.message_by_name("Heartbeat").unwrap();
let msg2 = dict.message_by_msgtype("0").unwrap();
assert_eq!(msg1.name(), msg2.name());
Returns the Message
that has the given msgtype
, if any.
use fefix::Dictionary;
let dict = Dictionary::fix44();
let msg1 = dict.message_by_msgtype("0").unwrap();
let msg2 = dict.message_by_name("Heartbeat").unwrap();
assert_eq!(msg1.name(), msg2.name());
Returns the Component
named name
, if any.
Returns the Datatype
named name
, if any.
use fefix::Dictionary;
let dict = Dictionary::fix44();
let dt = dict.datatype_by_name("String").unwrap();
assert_eq!(dt.name(), "String");
Returns the Field
associated with tag
, if any.
use fefix::Dictionary;
let dict = Dictionary::fix44();
let field1 = dict.field_by_tag(112).unwrap();
let field2 = dict.field_by_name("TestReqID").unwrap();
assert_eq!(field1.name(), field2.name());
Returns the Field
named name
, if any.
Returns an Iterator
over this Dictionary
’s messages. Items are in
no particular order.
use fefix::Dictionary;
let dict = Dictionary::fix44();
let msg = dict.iter_messages().find(|m| m.name() == "MarketDataRequest");
assert_eq!(msg.unwrap().msg_type(), "V");
Returns an Iterator
over this Dictionary
’s categories. Items are
in no particular order.
Returns an Iterator
over this Dictionary
’s fields. Items are
in no particular order.
Returns an Iterator
over this Dictionary
’s components. Items are in
no particular order.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Dictionary
impl Send for Dictionary
impl Sync for Dictionary
impl Unpin for Dictionary
impl UnwindSafe for Dictionary
Blanket Implementations
Mutably borrows from an owned value. Read more