#[non_exhaustive]pub enum ProtocolViolation {
UnexpectedResponse {
id: MessageId,
},
UnknownMessageType {
number: String,
},
ConcurrentCall {
id: MessageId,
},
WrongMessageKind {
action: String,
received: MessageKind,
},
WrongDirection {
action: String,
},
NonConformingMessageId {
id: MessageId,
},
DuplicateMessageId {
id: MessageId,
},
TooManyPeerRequests {
id: MessageId,
},
MalformedFrame {
error: FrameError,
},
StoreFailure {
error: StoreError,
},
UnserializableFrame {
reason: String,
},
}Expand description
Something the peer did that the specification forbids, but which is not fatal.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnexpectedResponse
A CALLRESULT / CALLERROR arrived for an id that is not outstanding.
UnknownMessageType
A message type number outside 2–6 (Part 4 §4.4).
ConcurrentCall
The peer started a second CALL while one was still outstanding.
WrongMessageKind
The peer sent an action defined as a SEND as a CALL, or the other way round
(N15.FR.01).
WrongDirection
The peer sent an action it is not allowed to originate.
NonConformingMessageId
The peer used a MessageId longer than 36 characters.
DuplicateMessageId
The peer reused a MessageId that is still unanswered (Part 4 §4.1.4, §4.2.3).
TooManyPeerRequests
The peer has more unanswered CALLs than
EngineConfig::max_peer_requests allows.
MalformedFrame
The frame could not be parsed at all.
Fields
error: FrameErrorThe parse failure.
StoreFailure
The durable store failed.
Fields
error: StoreErrorThe store’s complaint.
UnserializableFrame
A frame this peer wanted to send could not be serialized.
Only reachable from a payload the application supplied, since everything else the engine builds is known-good JSON.