pub enum Error {
Io(IoError),
Frame(FrameError),
Spec(SpecError),
Mission(MissionError),
}
Expand description
mavio
top-level error.
Returned by most of the functions and methods across mavio
. Other errors are either
converted to this error or wrapped by its variants.
§Caveats
We provide a limited support for Serde and
Specta. At the moment, the goal is simply to show something
meaningful. See IoError
for details.
This part of the API is considered unstable. Breaking changes may be introduced at any time.
To enable Serde or Specta for Error
, turn the unstable
feature on.
§Specta
The name of the exported type is MavioError
.
Variants§
Io(IoError)
I/O error wrapper. Check IoError
for details.
Frame(FrameError)
Frame validation errors.
Spec(SpecError)
MAVLink specification errors. A wrapper for SpecError
re-exported from MAVSpec.
Mission(MissionError)
⍚
MAVLink mission-related errors.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Error
impl<'de> Deserialize<'de> for Error
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<ChecksumError> for Error
impl From<ChecksumError> for Error
Source§fn from(value: ChecksumError) -> Self
fn from(value: ChecksumError) -> Self
Converts ChecksumError
into FrameError::Checksum
variant of Error::Frame
.
Source§impl From<FrameError> for Error
impl From<FrameError> for Error
Source§fn from(value: FrameError) -> Self
fn from(value: FrameError) -> Self
Converts FrameError
into Error::Frame
.
Source§impl From<IncompatFlagsError> for Error
impl From<IncompatFlagsError> for Error
Source§fn from(value: IncompatFlagsError) -> Self
fn from(value: IncompatFlagsError) -> Self
Converts IncompatFlagsError
into FrameError::Incompatible
variant of Error::Frame
.
Source§impl From<MissionError> for Error
impl From<MissionError> for Error
Source§fn from(value: MissionError) -> Self
fn from(value: MissionError) -> Self
Converts MissionError
into Error::Mission
variant of Error
.
Source§impl From<SignatureError> for Error
impl From<SignatureError> for Error
Source§fn from(value: SignatureError) -> Self
fn from(value: SignatureError) -> Self
Converts SignatureError
into FrameError::Signature
variant of Error::Frame
.
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
.
Source§impl From<VersionError> for Error
impl From<VersionError> for Error
Source§fn from(value: VersionError) -> Self
fn from(value: VersionError) -> Self
Converts VersionError
into FrameError::Version
variant of Error::Frame
.
Source§impl NamedType for Error
impl NamedType for Error
fn sid() -> SpectaID
Source§fn named_data_type(
type_map: &mut TypeCollection,
generics: &[DataType],
) -> NamedDataType
fn named_data_type( type_map: &mut TypeCollection, generics: &[DataType], ) -> NamedDataType
Source§fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
Source§impl Type for Error
impl Type for Error
Source§fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
Source§fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
definition
will be put into the type map.