#[non_exhaustive]pub enum EngineError {
Show 25 variants
Io(Error),
Codec(CodecError),
Decode(DecodeError),
Encode(EncodeError),
Config(SessionConfigError),
ConnectTimeout(Duration),
LogonTimeout(Duration),
LogonRejected {
reason: String,
},
HeartbeatInterval {
detail: String,
},
UnexpectedMessage {
msg_type: String,
},
Sequence(String),
SequenceExhausted(SequenceExhausted),
InvalidInitialSequence {
counter: SequenceCounter,
},
IdentityMismatch {
detail: String,
},
BeginStringMismatch {
expected: String,
received: String,
},
SendingTime {
detail: String,
},
UnsupportedVersion {
version: String,
detail: String,
},
Store(StoreError),
WriteTimeout(Duration),
ReservedMsgType {
msg_type: String,
},
ReservedTag {
tag: u32,
},
InvalidField {
tag: u32,
reason: String,
},
MissingRequiredField {
msg_type: String,
tag: u32,
},
Closed,
Configuration(String),
}Expand description
Errors produced by the engine transport layer.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io(Error)
Underlying I/O failure.
Codec(CodecError)
Framing or checksum failure at the codec layer.
Decode(DecodeError)
Failure decoding a framed FIX message.
Encode(EncodeError)
A message could not be encoded into a legal frame.
Raised when a field value has no on-the-wire form — a value carrying the
SOH delimiter, or an empty one. The encoder refuses to stamp such a
frame rather than emit one whose BodyLength and CheckSum are correct
for corrupted bytes.
Config(SessionConfigError)
The session configuration is not usable.
Checked before the socket is dialled: an out-of-range knob — a
fractional HeartBtInt, an identity string carrying SOH or =, a zero
timeout — would otherwise corrupt the session’s own messages.
ironfix_session::SessionConfigBuilder reports the same errors at
configuration time.
ConnectTimeout(Duration)
TCP connect did not complete within the configured timeout.
LogonTimeout(Duration)
The Logon acknowledgement did not arrive within the logon timeout.
LogonRejected
The counterparty rejected the Logon.
HeartbeatInterval
The HeartBtInt (108) on the Logon acknowledgement could not be adopted
as the session’s heartbeat interval.
Raised when the ack omits the required field, carries a non-numeric
value, or confirms an interval above
ironfix_session::heartbeat::MAX_HEARTBEAT_INTERVAL_SECS — the value
drives every liveness timer in the session and is counterparty
controlled, so an unbounded one is refused. 108=0 is legal and never
raises this — it means “do not heartbeat”.
UnexpectedMessage
An unexpected message type arrived while awaiting the Logon acknowledgement.
Sequence(String)
A sequence number violation that is fatal for the session.
SequenceExhausted(SequenceExhausted)
A sequence counter reached u64::MAX. No further messages can be
numbered until the session performs a sequence reset.
InvalidInitialSequence
A seeded initial sequence number was zero.
FIX numbers messages from 1; a seeded MsgSeqNum (34) of 0 would be
rejected by every conforming counterparty. Checked before the socket is
dialled. Set through
Initiator::with_initial_sequences.
Fields
counter: SequenceCounterWhich seeded counter was zero.
IdentityMismatch
The counterparty’s identity fields (49/56, and 50/57 when configured) did not match the session configuration.
BeginStringMismatch
The Logon acknowledgement carried a BeginString (8) that does not
match the configured session version.
For a FIX 5.0 / FIXT.1.1 session the configured transport
BeginString is FIXT.1.1, so an ack tagged FIX.5.0* — or any
other version — is not this session’s acknowledgement and aborts the
handshake.
Fields
SendingTime
The counterparty’s SendingTime (52) failed validation: absent,
unparseable, or further from the local clock than
SessionConfig::sending_time_tolerance allows.
UnsupportedVersion
The configured BeginString cannot be framed conformantly.
An unknown version, or FIXT.1.1 on its own — which names the
transport version but no application version for the required
DefaultApplVerID (1137).
Store(StoreError)
A message-store operation the session depends on failed during setup.
Raised by Initiator::connect when the
store cannot be reset for a ResetSeqNumFlag (141) Logon, or refreshed to
recover its counters, before the session starts. Continuing anyway would
either file a new stream on top of a previous one’s numbers or reuse a
MsgSeqNum the counterparty has already seen, so the session is refused
rather than started from a counter the store could not vouch for.
WriteTimeout(Duration)
A write to the counterparty did not complete within the write timeout.
A peer that stops reading parks a socket write forever once its receive window closes, which would take the reactor’s liveness timers with it. The write is therefore bounded and its expiry closes the session, which is the same verdict heartbeat detection would have reached.
ReservedMsgType
An administrative MsgType was offered on the application send path.
Logon (A), Logout (5), SequenceReset (4) and the rest of the
administrative set belong to the session state machine. One emitted
through Connection::send would bypass the
typestate and the engine’s phase tracking — a Logout sent that way, for
instance, never arms the logout timeout.
ReservedTag
An outbound body carried a tag the engine stamps itself.
See crate::outbound::RESERVED_TAGS. The frame would carry two
occurrences of the tag, which a conforming counterparty rejects or
misparses.
InvalidField
An outbound field value has no legal wire form.
The reason never quotes the value: an outbound Logon body carries
Password (554) and NewPassword (925).
MissingRequiredField
An administrative message lost a field its MsgType cannot go out without.
A to_admin callback removed a required body field — HeartBtInt (108)
from a Logon, TestReqID (112) from a TestRequest, NewSeqNo (36) from
a SequenceReset, and the like. Emitting the message anyway would put a
malformed administrative frame on the wire that a conforming
counterparty rejects; the session refuses it instead.
Fields
Closed
The connection is closed; no more messages can be sent.
Configuration(String)
The builder was asked to produce an engine it was not configured for — for example a terminal method called with no session, or with more than one where a single-session engine is required.
Trait Implementations§
Source§impl Debug for EngineError
impl Debug for EngineError
Source§impl Display for EngineError
impl Display for EngineError
Source§impl Error for EngineError
impl Error for EngineError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()