Enum libcoap_rs::error::MessageConversionError
source · pub enum MessageConversionError {
InvalidOptionValue(Option<CoapOptionType>, OptionValueError),
InvalidOptionForMessageType(CoapOptionType),
NonRepeatableOptionRepeated(CoapOptionType),
NotACoapUri(UriParsingError),
InvalidUri(ParseError),
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.
InvalidUri(ParseError)
URI is invalid (most likely a Proxy URI cannot be parsed as a valid URL).
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
sourceimpl Clone for MessageConversionError
impl Clone for MessageConversionError
sourcefn clone(&self) -> MessageConversionError
fn clone(&self) -> MessageConversionError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for MessageConversionError
impl Debug for MessageConversionError
sourceimpl Display for MessageConversionError
impl Display for MessageConversionError
sourceimpl Error for MessageConversionError
impl Error for MessageConversionError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
sourceimpl From<MessageCodeError> for MessageConversionError
impl From<MessageCodeError> for MessageConversionError
sourcefn from(source: MessageCodeError) -> Self
fn from(source: MessageCodeError) -> Self
Converts to this type from the input type.
sourceimpl From<ParseError> for MessageConversionError
impl From<ParseError> for MessageConversionError
sourcefn from(v: ParseError) -> Self
fn from(v: ParseError) -> Self
Converts to this type from the input type.
sourceimpl From<UriParsingError> for MessageConversionError
impl From<UriParsingError> for MessageConversionError
sourcefn from(v: UriParsingError) -> Self
fn from(v: UriParsingError) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<MessageConversionError> for MessageConversionError
impl PartialEq<MessageConversionError> for MessageConversionError
sourcefn eq(&self, other: &MessageConversionError) -> bool
fn eq(&self, other: &MessageConversionError) -> bool
impl Eq for MessageConversionError
impl StructuralEq for MessageConversionError
impl StructuralPartialEq for MessageConversionError
Auto Trait Implementations
impl RefUnwindSafe for MessageConversionError
impl Send for MessageConversionError
impl Sync for MessageConversionError
impl Unpin for MessageConversionError
impl UnwindSafe for MessageConversionError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more