easyfix-core
Core types and traits for the easyfix FIX engine.
This crate defines the contract between the session layer (easyfix-session)
and message implementations — whether generated from XML by easyfix-messages
or hand-written for custom use cases.
What's inside
- Basic types:
FixStr/FixString, decimal numbers, sequence and tag numbers, dates and times. Timestamp and time wrappers carryTimePrecision. Thefix_str!macro validates string literals at compile time. - Version types:
VersionandApplVerId; field wrappers such asMsgTypeField,SessionStatusFieldandSessionRejectReasonField. - Base messages:
HeaderBasefor routing and sequencing fields,AdminBasefor the seven admin message types, and their base enumerations. String fields useCow<FixStr>for borrowed or owned values. - Traits:
SessionMessageconnects message implementations to the session;HeaderAccessprovides header access and the protocol version. - Wire encoding:
RawMessageframing,Deserializerfor typed fields andSerializerwriting into a caller-provided buffer, with structured deserialization and serialization errors.
Implementing custom message types
For use cases where code generation from XML is not suitable, you can implement
SessionMessage and HeaderAccess directly. See the
dynamic_message example for a simplified
implementation backed by a HashMap, covering admin messages and
NewOrderSingle.
Serde support
Optional serde-serialize and serde-deserialize features enable Serde
support for core types.
License
MIT