#[non_exhaustive]pub enum Error {
IoError,
IoTimeout,
NotAligned,
OutOfBounds,
NotSupported,
Unknown,
}unstable only.Expand description
Flash operation error.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
IoError
I/O error reported by the ROM.
Includes a ROM-side size check against its cached chip size when that
is smaller than Flash::capacity.
IoTimeout
Operation timed out.
NotAligned
Address or length is not aligned for this operation.
Flash::read, Flash::read_encrypted, and Flash::write require a
4-byte-aligned flash offset. Flash::write_encrypted requires a
16-byte address and a word count that is a multiple of 4 (16 bytes).
Flash::erase requires a 4096-byte range.
OutOfBounds
Address range exceeds Flash::capacity, or from > to.
Capacity is the JEDEC density, not the ROM cached chip size. An address range within this limit can still fail in the ROM if the cached size is smaller (often the image-header size on ESP32).
NotSupported
Not supported in the current environment.
Returned when the buffer is not in DRAM, when
Flash::write_encrypted is called while flash encryption is disabled,
or when Flash::read_encrypted cannot allocate an MMU entry.
Unknown
Unexpected ROM status code (logged).
Trait Implementations§
impl Copy for Error
impl Eq for Error
Source§impl Error for Error
impl Error for Error
1.30.0§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)