pub enum ParseError {
UnknownError,
UnknownResponse(u16),
IO(Error),
StringError,
NotEnoughBytes,
}
Expand description
Errors caused during message parsing
Variants§
UnknownError
Something unexpected happened
This error is returned when End-Of-Data marker is not as expected, this most likely mean that all data parsed is garbage and that there is a version mismatch.
UnknownResponse(u16)
Unknown message received from Motive
The number included is the message ID given by NatNet
.
IO(Error)
Problem reading bytes from input source
This error is caused by an IO error on the given input source the cause of the IO error is returned so that users can inspect the cause.
StringError
Problem converting C-String in Motive
There was a problem converting the bytes that Motive considers a string into what Rust considers a String.
NotEnoughBytes
There were not enough bytes in the source to parse a complete message
This is most likely caused by a mismatch in versions.
Trait Implementations§
Source§impl Debug for ParseError
impl Debug for ParseError
Source§impl Display for ParseError
impl Display for ParseError
Source§impl Error for ParseError
impl Error for ParseError
Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§fn cause(&self) -> Option<&dyn StdError>
fn cause(&self) -> Option<&dyn StdError>
Source§impl From<Error> for ParseError
impl From<Error> for ParseError
Source§fn from(err: Error) -> ParseError
fn from(err: Error) -> ParseError
Convert an IO error into a ParseError
Source§impl From<NulError> for ParseError
impl From<NulError> for ParseError
Source§fn from(_: NulError) -> ParseError
fn from(_: NulError) -> ParseError
Convert a std::ffi::NulError
into a ParseError::StringError