Skip to main content

Crate refix_message

Crate refix_message 

Source
Expand description

§refix-message

Framing, 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::stream::Outcome;
use refix_message::{MessageStream, Tag, Tokenizer};

fn main() {
    let log = b"2026-10-10 09:30:00 IN 8=FIX.4.4\x019=5\x0135=0\x0110=163\x01\n";
    let mut stream = MessageStream::new(Tokenizer::default());
    stream.feed(log);
    loop {
        match stream.next_message() {
            Outcome::Message(message) => println!("{:?}", message.get_str(Tag(35))),
            Outcome::Garbled { bytes, .. } => println!("skipped {} bytes", bytes.len()),
            Outcome::Incomplete => break,
        }
    }
}

Tokenizer::tokenize reads a single frame. Typed messages are generated on top of it: refix-fix44 for FIX 4.4, or refix-cli for your own dictionary.

§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 multiple_values::MultipleValues;
pub use stream::MessageStream;

Modules§

framing
Framing: delimiting one checksum-verified FIX message from a byte stream.
group
multiple_values
stream

Structs§

Decimal
A FIX float, such as a price or quantity, as mantissa * 10^exponent.
InvalidValue
A field value whose bytes can’t be read as the field’s declared data type.
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.
Tokenizer
Splits a framed FIX message into its fields.

Enums§

TokenizeError
Issues that can arise when the bytes handed to the tokeniser are not a valid FIX message.