pub enum MessageConversionError {
InvalidOptionValue(Option<CoapOptionType>, OptionValueError),
InvalidOptionForMessageType(CoapOptionType),
NonRepeatableOptionRepeated(CoapOptionType),
NotACoapUri(UriParsingError),
InvalidMessageCode(MessageCodeError),
DataInEmptyMessage,
MissingToken,
MissingMessageId,
InvalidOptionCombination(CoapOptionType, CoapOptionType),
CriticalOptionUnrecognized,
Unknown,
}
Variants§
InvalidOptionValue(Option<CoapOptionType>, OptionValueError)
Value of an option is invalid.
InvalidOptionForMessageType(CoapOptionType)
Message has an option that is specific for another message type (i.e., request option in response message).
NonRepeatableOptionRepeated(CoapOptionType)
Non-repeatable option was repeated.
NotACoapUri(UriParsingError)
Provided URI has invalid scheme.
InvalidMessageCode(MessageCodeError)
Invalid message code.
DataInEmptyMessage
A message with code 0.00 (Empty) contains data.
MissingToken
Message has no token.
MissingMessageId
Message has no ID.
InvalidOptionCombination(CoapOptionType, CoapOptionType)
Two (or more) options were combined which must not be combined (e.g., Proxy-Scheme and Proxy-URI).
CriticalOptionUnrecognized
A critical option (as defined in RFC 7252 was not recognized).
Unknown
Unknown error inside of libcoap.
Trait Implementations§
Source§impl Clone for MessageConversionError
impl Clone for MessageConversionError
Source§fn clone(&self) -> MessageConversionError
fn clone(&self) -> MessageConversionError
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for MessageConversionError
impl Debug for MessageConversionError
Source§impl Display for MessageConversionError
impl Display for MessageConversionError
Source§impl Error for MessageConversionError
impl Error for MessageConversionError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<MessageCodeError> for MessageConversionError
impl From<MessageCodeError> for MessageConversionError
Source§fn from(source: MessageCodeError) -> Self
fn from(source: MessageCodeError) -> Self
Converts to this type from the input type.
Source§impl From<UriParsingError> for MessageConversionError
impl From<UriParsingError> for MessageConversionError
Source§fn from(v: UriParsingError) -> Self
fn from(v: UriParsingError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for MessageConversionError
impl PartialEq for MessageConversionError
impl Eq for MessageConversionError
impl StructuralPartialEq for MessageConversionError
Auto Trait Implementations§
impl Freeze for MessageConversionError
impl RefUnwindSafe for MessageConversionError
impl Send for MessageConversionError
impl Sync for MessageConversionError
impl Unpin for MessageConversionError
impl UnwindSafe for MessageConversionError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more