#[repr(u8)]pub enum PebStatus {
Erasing = 128,
Reclaiming = 192,
Actived = 224,
Transfered = 240,
Transfering = 248,
Activing = 252,
Empty = 254,
Virgin = 255,
Unknown = 0,
}Expand description
Enum representing the status of a Physical Erase Block (PEB).
This enum maps directly to peb_status_t from the C implementation.
The values are encoded as raw bytes in flash metadata and therefore
occupy the upper range of a u8.
The ordering and spacing of the values reflect different phases of the PEB lifecycle, including erase, activation, data transfer, and reclaim operations. These values must not be renumbered.
Variants§
Erasing = 128
The PEB is currently being erased.
Reclaiming = 192
The PEB is being reclaimed after becoming obsolete.
Actived = 224
The PEB is active and contains valid data.
Transfered = 240
The PEB has finished transferring its data to another block.
Transfering = 248
The PEB is in the process of transferring its data.
Activing = 252
The PEB is in the process of becoming active.
Empty = 254
The PEB is empty and contains no valid data.
Virgin = 255
the block status is undefined, it maybe has erased or not erased completely
Unknown = 0
any other state
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PebStatus
impl<'de> Deserialize<'de> for PebStatus
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>,
impl Copy for PebStatus
impl StructuralPartialEq for PebStatus
Auto Trait Implementations§
impl Freeze for PebStatus
impl RefUnwindSafe for PebStatus
impl Send for PebStatus
impl Sync for PebStatus
impl Unpin for PebStatus
impl UnwindSafe for PebStatus
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more