Enum kwap_msg::OptParseError
source · [−]pub enum OptParseError {
UnexpectedEndOfStream,
OptionValueTooLong {
capacity: usize,
actual: usize,
},
TooManyOptions(usize),
OptionDeltaReservedValue(u8),
ValueLengthReservedValue(u8),
OptionsExhausted,
}
Expand description
Errors encounterable while parsing an option from bytes
Variants
UnexpectedEndOfStream
Reached end of stream before parsing was finished
OptionValueTooLong
Option value was longer than the fixed capacity
TooManyOptions(usize)
Parsed more options than reserved capacity
OptionDeltaReservedValue(u8)
Option Delta was set to 15, which is invalid.
ValueLengthReservedValue(u8)
Value Length was set to 15, which is invalid.
OptionsExhausted
Not a true failure case; only means we tried to read the payload marker byte (0xFF) as an option header.
Trait Implementations
sourceimpl Clone for OptParseError
impl Clone for OptParseError
sourcefn clone(&self) -> OptParseError
fn clone(&self) -> OptParseError
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 OptParseError
impl Debug for OptParseError
sourceimpl PartialEq<OptParseError> for OptParseError
impl PartialEq<OptParseError> for OptParseError
sourcefn eq(&self, other: &OptParseError) -> bool
fn eq(&self, other: &OptParseError) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &OptParseError) -> bool
fn ne(&self, other: &OptParseError) -> bool
This method tests for !=
.
sourceimpl PartialOrd<OptParseError> for OptParseError
impl PartialOrd<OptParseError> for OptParseError
sourcefn partial_cmp(&self, other: &OptParseError) -> Option<Ordering>
fn partial_cmp(&self, other: &OptParseError) -> 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 OptParseError
impl StructuralPartialEq for OptParseError
Auto Trait Implementations
impl RefUnwindSafe for OptParseError
impl Send for OptParseError
impl Sync for OptParseError
impl Unpin for OptParseError
impl UnwindSafe for OptParseError
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