Skip to main content

Module deserializer

Module deserializer 

Source
Expand description

Reading FIX tag-value messages.

Two stages: raw_message frames one message out of a byte stream, checking BeginString, BodyLength and CheckSum without looking inside; Deserializer then walks that frame’s body, handing typed values to the generated message types. Both borrow from the input rather than copying it.

Failures are classified by what the session must do about them - see DeserializeErrorKind.

Structs§

Deserializer
Reads typed FIX values out of a framed RawMessage, field by field.
FieldCursor
An independent, borrowed cursor over field tags and values.
RawMessage
One structurally valid FIX message framed out of a byte stream by raw_message, borrowing from that stream - no bytes are copied.

Enums§

DeserializeErrorKind
A failed deserialization, classified by what the session must do about it.
GarbledReason
Why a message could not be framed or parsed as FIX at all.
LogoutReason
Cause of a DeserializeErrorKind::Logout - a well-formed message that the session must answer with a Logout(35=5) and disconnect.
RawMessageError
Why raw_message could not frame a message.

Functions§

frame_len
Total length of the frame starting at bytes[0], known as soon as its BeginString(8) and BodyLength(9) have arrived: the two framing fields, BodyLength(9) bytes of body and the CheckSum(10) trailer.
raw_message
Frame one message out of bytes, returning the unconsumed remainder alongside it. Zero-copy: the RawMessage borrows from bytes.