Enum toad_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)
Implementations
sourceimpl MessageParseError
impl MessageParseError
sourcepub fn eof() -> Self
pub fn eof() -> Self
Shorthand for MessageParseError::UnexpectedEndOfStream
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 moresourceimpl 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
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>
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 moreimpl 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 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