pub enum SpecError {
UnsupportedMavLinkVersion {
actual: MavLinkVersion,
minimal: MavLinkVersion,
},
NotInDialect(u32),
InvalidEnumValue {
enum_name: &'static str,
},
InvalidV1PayloadSize {
actual: usize,
expected: usize,
},
}
Expand description
mavspec
Errors related to MAVLink message specification.
Upon conversion into Mavio Error
, this error will be wrapped by Error::Spec
, except
SpecError::NotInDialect
, that will be converted into FrameError::NotInDialect
and
wrapped by Error::Frame
.
Errors related to MAVLink message specification and encoding/decoding.
All errors except SpecError::InvalidV1PayloadSize
are related to wrong user input like
incorrectly chosen MAVLink dialect or protocol version.
Variants§
UnsupportedMavLinkVersion
MAVLink version is not supported.
Fields
actual: MavLinkVersion
Actual requested version.
minimal: MavLinkVersion
Minimum supported MAVLink version,
NotInDialect(u32)
MAVLink message with specified ID is not in dialect.
InvalidEnumValue
Error during conversion to MAVLink enum.
InvalidV1PayloadSize
Invalid size of the MAVLink 1
payload.
Trait Implementations§
source§impl From<SpecError> for Error
impl From<SpecError> for Error
source§fn from(value: SpecError) -> Self
fn from(value: SpecError) -> Self
Converts SpecError
into Error::Spec
.
There is a special case for SpecError::NotInDialect
, that will be converted to
FrameError::NotInDialect
variant of Error::Frame
.
Auto Trait Implementations§
impl Freeze for SpecError
impl RefUnwindSafe for SpecError
impl Send for SpecError
impl Sync for SpecError
impl Unpin for SpecError
impl UnwindSafe for SpecError
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)