#[non_exhaustive]pub enum Error {
OutOfBounds,
Unaligned,
Protected,
NotErased,
Hardware,
Ecc,
}Expand description
Flash error
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
OutOfBounds
The address range is outside the flash memory or region.
Unaligned
The address or length is not a multiple of the write or erase size.
Protected
The target area is write-protected (WRPERR).
NotErased
The target location was not erased before programming (PGERR, PROGERR, NOTZEROERR,
or an EDATA word that was already programmed).
Hardware
The hardware reported a programming or erase error, for example a sequence, size, alignment or parallelism error. See the status register flags in the reference manual.
Ecc
The data read contains an uncorrectable ECC error: two or more bits of a flash word are wrong. Program and erase operations interrupted by a reset or power loss leave such errors behind, and so does programming a flash word twice without erasing it.
Trait Implementations§
impl Copy for Error
impl Eq for Error
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
use the Display impl or to_string()