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§
Source§impl Clone for OptParseError
impl Clone for OptParseError
Source§fn clone(&self) -> OptParseError
fn clone(&self) -> OptParseError
Returns a duplicate 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 OptParseError
impl Debug for OptParseError
Source§impl PartialEq for OptParseError
impl PartialEq for OptParseError
Source§impl PartialOrd for OptParseError
impl PartialOrd for OptParseError
impl Copy for OptParseError
impl StructuralPartialEq for OptParseError
Auto Trait Implementations§
impl Freeze for OptParseError
impl RefUnwindSafe for OptParseError
impl Send for OptParseError
impl Sync for OptParseError
impl Unpin for OptParseError
impl UnwindSafe for OptParseError
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