pub enum VEError {
Parse(String),
NeedMoreData,
ChecksumError,
MissingField(String),
OnOffExpected(String),
UnknownCode(String),
}Expand description
Errors from the parser
Variants§
Parse(String)
General parsing errors
NeedMoreData
A non-fatal error. The parser can be fed a stream of data in chunks; and a given chunk might, for example, stop in the middle of a field name (in which case the parser needs more data to continue working)
ChecksumError
Malformed data
MissingField(String)
A required field was missing from the received data
OnOffExpected(String)
A field was expected to be a boolean type but received differently formatted data
UnknownCode(String)
Some fields are encoded as hexidecimal codes, and this error occurs if the received code is not recognized
Trait Implementations§
Source§impl Error for VEError
impl Error for VEError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ParseFloatError> for VEError
impl From<ParseFloatError> for VEError
Source§fn from(src: ParseFloatError) -> VEError
fn from(src: ParseFloatError) -> VEError
Converts to this type from the input type.
Source§impl From<ParseIntError> for VEError
impl From<ParseIntError> for VEError
Source§fn from(src: ParseIntError) -> VEError
fn from(src: ParseIntError) -> VEError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for VEError
impl RefUnwindSafe for VEError
impl Send for VEError
impl Sync for VEError
impl Unpin for VEError
impl UnwindSafe for VEError
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