Skip to main content

truefix_core/
lib.rs

1//! `truefix-core` — FIX message model, field types, and the SOH wire codec.
2//!
3//! Provides [`Field`], [`FieldMap`], [`Group`], and [`Message`] (header/body/trailer),
4//! plus [`encode`]/[`decode`] that compute and verify BodyLength (tag 9) and CheckSum
5//! (tag 10). All parsing returns typed errors and never panics (Constitution Principle I).
6//!
7//! Repeating-group *structure* is modelled here; dictionary-driven group *parsing* from a
8//! flat wire message arrives with `truefix-dict` (Stage S4). At this layer, decoding yields
9//! flat ordered fields, which still round-trips byte-for-byte.
10//!
11//! Design: `specs/001-fix-engine-parity/`.
12#![cfg_attr(
13    not(test),
14    deny(
15        clippy::unwrap_used,
16        clippy::expect_used,
17        clippy::panic,
18        clippy::indexing_slicing
19    )
20)]
21
22pub mod codec;
23pub mod cracker;
24pub mod error;
25pub mod factory;
26pub mod field;
27pub mod field_map;
28pub mod framing;
29pub mod group;
30pub mod message;
31pub mod tags;
32
33pub use codec::{decode, decode_with_groups, encode, encode_with_order, restructure_groups};
34pub use cracker::MessageCracker;
35pub use error::{BusinessReject, DecodeError, DoNotSend, FieldError, Reject};
36pub use factory::MessageFactory;
37pub use field::Field;
38pub use field_map::{FieldMap, MemberRef};
39pub use framing::{MAX_BODY_LEN, frame_length};
40pub use group::{Group, GroupSpec};
41pub use message::Message;
42pub use tags::SOH;