Enum kwap_msg::MessageParseError
source · [−]pub enum MessageParseError {
UnexpectedEndOfStream,
InvalidTokenLength(u8),
OptParseError(OptParseError),
PayloadTooLong(usize),
InvalidType(u8),
}
Expand description
Errors encounterable while parsing a message from bytes
Variants
UnexpectedEndOfStream
Reached end of stream before parsing was finished
InvalidTokenLength(u8)
Token length was > 8
OptParseError(OptParseError)
Error parsing option
PayloadTooLong(usize)
The rest of the message contained more bytes than there was capacity for
InvalidType(u8)
The message type is invalid (see Type
for information & valid values)
Trait Implementations
sourceimpl Clone for MessageParseError
impl Clone for MessageParseError
sourcefn clone(&self) -> MessageParseError
fn clone(&self) -> MessageParseError
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 more
sourceimpl Debug for MessageParseError
impl Debug for MessageParseError
sourceimpl PartialEq<MessageParseError> for MessageParseError
impl PartialEq<MessageParseError> for MessageParseError
sourcefn eq(&self, other: &MessageParseError) -> bool
fn eq(&self, other: &MessageParseError) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &MessageParseError) -> bool
fn ne(&self, other: &MessageParseError) -> bool
This method tests for !=
.
sourceimpl PartialOrd<MessageParseError> for MessageParseError
impl PartialOrd<MessageParseError> for MessageParseError
sourcefn partial_cmp(&self, other: &MessageParseError) -> Option<Ordering>
fn partial_cmp(&self, other: &MessageParseError) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for MessageParseError
impl StructuralPartialEq for MessageParseError
Auto Trait Implementations
impl RefUnwindSafe for MessageParseError
impl Send for MessageParseError
impl Sync for MessageParseError
impl Unpin for MessageParseError
impl UnwindSafe for MessageParseError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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