#[non_exhaustive]pub enum DecodeError {
UnexpectedEnd,
NotRtps([u8; 4]),
UnsupportedVersion(ProtocolVersion),
BadSubmessageLength {
offset: usize,
},
InvalidSubmessage {
id: u8,
reason: &'static str,
},
InvalidParameterList(&'static str),
InvalidParameterValue(ParameterId),
MissingParameter(ParameterId),
MustUnderstand(ParameterId),
UnknownRepresentation([u8; 2]),
}Expand description
Why a message, a submessage or a parameter list could not be read.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnexpectedEnd
The input ended before a field could be read.
NotRtps([u8; 4])
The message does not start with RTPS (DDSI-RTPS 2.5, 8.3.6.3).
UnsupportedVersion(ProtocolVersion)
The major protocol version is newer than this implementation (DDSI-RTPS 2.5, 8.3.6.3).
BadSubmessageLength
A submessage header could not be read in full, or its
octetsToNextHeader goes past the end of the message
(DDSI-RTPS 2.5, 8.3.4.1 rules 1 and 2).
InvalidSubmessage
A known submessage is invalid (DDSI-RTPS 2.5, 8.3.4.1 rule 6 and the “Validity” part of each submessage in 8.3.8).
InvalidParameterList(&'static str)
A parameter list is malformed (DDSI-RTPS 2.5, 9.4.2.11).
InvalidParameterValue(ParameterId)
A parameter value is too short or not valid for its type.
MissingParameter(ParameterId)
A required parameter is missing.
MustUnderstand(ParameterId)
A parameter that is not understood has the must-understand bit set (DDSI-RTPS 2.5, Table 9.6).
UnknownRepresentation([u8; 2])
A serialized payload uses a representation that is not supported here (DDSI-RTPS 2.5, clause 10).
Trait Implementations§
Source§impl Clone for DecodeError
impl Clone for DecodeError
Source§impl Debug for DecodeError
impl Debug for DecodeError
Source§impl Display for DecodeError
impl Display for DecodeError
impl Eq for DecodeError
Source§impl Error for DecodeError
impl Error for DecodeError
1.30.0 · 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()