Expand description
§refix-message
Framing, log reading, tokenising and raw FIX messages for ReFIX. A RawMessage
indexes a frame’s fields and reads them on demand, without copying.
ReFIX is in early development, and APIs change between 0.x releases.
use refix_message::{LogReader, Tag};
fn main() {
let log = b"2026-10-10 09:30:00 IN 8=FIX.4.4|9=5|35=0|10=163|\n";
let mut reader = LogReader::default();
reader.feed(log);
for record in reader.finish() {
let prefix = String::from_utf8_lossy(&record.prefix);
println!("{prefix:?} {:?} {:?}", record.message.get_str(Tag(35)), record.diagnostics);
}
}MessageStream frames a session’s bytes strictly, and Tokenizer::tokenize reads a single frame. Typed messages are
generated on top of the tokenizer: refix-fix44 for FIX 4.4, or refix-cli for your own dictionary.
§Features
bigdecimal-04convertsDecimalto and from bigdecimal 0.4.chrono-04convertsDate,TimeandUtcTimestampto and from chrono 0.4.jiff-02convertsDate,TimeandUtcTimestampto and from jiff 0.2.rust_decimal-1convertsDecimalto and from rust_decimal 1.time-03convertsDate,TimeandUtcTimestampto and from time 0.3.
§License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Re-exports§
pub use group::Group;pub use group::GroupLayout;pub use group::GroupTable;pub use group::GroupTableError;pub use group::Instances;pub use group::KnownTags;pub use group::OwnedGroupTable;pub use log::LogReader;pub use multiple_values::MultipleValues;pub use stream::MessageStream;
Modules§
- framing
- Framing: delimiting one checksum-verified FIX message from a byte stream.
- group
- log
- Reading messages out of FIX logs.
- multiple_
values - stream
Structs§
- Date
- A FIX date, as in a UTCDateOnly or LocalMktDate field.
- Decimal
- A FIX float, such as a price or quantity, as
mantissa * 10^exponent. - Dialect
- How a counterparty’s FIX differs from the standard.
- Invalid
Value - A field value whose bytes can’t be read as the field’s declared data type.
- Month
Year - A FIX MonthYear, such as a contract’s maturity, with an optional day or week of the month.
- OutOf
Range - A value outside the range of the type it converts to.
- RawMessage
- Raw bytes of a FIX message and an index of every field in wire order.
- Scope
- A bounded view of a message’s fields - the whole frame or one group instance.
- Slot
- A field’s position in a message’s index.
- Tag
- A FIX tag number, e.g.
Tag(35)for MsgType. - Time
- A FIX time of day, as in a UTCTimeOnly or LocalMktTime field, keeping its precision.
- Time
Precision - How finely a time is written, as its count of fraction digits.
- Tokenizer
- Splits a framed FIX message into its fields.
- UtcTimestamp
- A FIX UTCTimestamp as nanoseconds since the Unix epoch, keeping its precision.
Enums§
- Tokenize
Error - Issues that can arise when the bytes handed to the tokeniser are not a valid FIX message.