Enum Error
#[non_exhaustive]pub enum Error {
Show 15 variants
ChecksumMismatch(&'static str),
ImageChecksumMismatch(&'static str),
FlashedChecksumMismatch(&'static str),
ImageTooLarge(&'static str),
Flash {
partition: &'static str,
source: Error,
},
FotaInfoNotFound,
FotaInfoCrcMismatch {
stored: u32,
calculated: u32,
},
Io(Error),
InvalidFotaBlob(Box<dyn StdError + Send + Sync>),
MissingFile(String),
InvalidFotaConfig(Box<dyn StdError + Send + Sync>),
UnknownPartition(String),
IncompleteDiff(&'static str),
PartitionMissing(&'static str),
Patch(PatchError),
}Expand description
Errors that can occur when updating a partition through the Quectel FOTA update system or when accessing the FOTA info.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ChecksumMismatch(&'static str)
A partition does not have the checksum that the FOTA config expects.
ImageChecksumMismatch(&'static str)
The new image for a partition does not have the checksum that the FOTA config expects.
FlashedChecksumMismatch(&'static str)
The data read back from a partition after flashing does not have the checksum that the FOTA config expects. The partition contains a bad image.
ImageTooLarge(&'static str)
The image for a partition exceeds its capacity. The partition is unchanged.
Flash
Flashing a partition failed. The partition may contain a partial image.
FotaInfoNotFound
The FOTA info magic is missing from all three blocks.
FotaInfoCrcMismatch
A block contains the FOTA info magic, but its CRC is wrong.
Io(Error)
General IO error.
InvalidFotaBlob(Box<dyn StdError + Send + Sync>)
The FOTA blob is not a valid ZIP archive.
MissingFile(String)
The FOTA blob does not contain a file.
InvalidFotaConfig(Box<dyn StdError + Send + Sync>)
The config inside the FOTA blob is not valid.
UnknownPartition(String)
The FOTA config specifies an unknown partition.
IncompleteDiff(&'static str)
The FOTA config has a diff update for a partition without the old size, the old checksum or the patch.
PartitionMissing(&'static str)
A partition is not present on the system.
Patch(PatchError)
Patching a partition failed. No partition was updated at this point.
Implementations§
§impl Error
impl Error
pub(crate) fn invalid_blob(err: ZipError) -> Self
pub(crate) fn invalid_config(err: DeError) -> Self
Trait Implementations§
§impl Error for Error
impl Error for Error
§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
use the Display impl or to_string()