Struct FotaPartition
pub struct FotaPartition(Partition);Expand description
FOTA info partition.
Tuple Fields§
§0: PartitionImplementations§
§impl FotaPartition
impl FotaPartition
pub fn modify(&mut self, f: impl FnOnce(&mut FotaInfo)) -> Result<()>
pub fn modify(&mut self, f: impl FnOnce(&mut FotaInfo)) -> Result<()>
Modifies the FOTA info in the partition and writes it back.
Changes will only be written if the state is modified.
pub unsafe fn write(&mut self, info: &FotaInfo) -> Result<()>
pub unsafe fn write(&mut self, info: &FotaInfo) -> Result<()>
Writes the FOTA info to the partition.
Consider using FotaPartition::modify instead of this function.
§Safety
This function is unsafe because it writes the FOTA info to the partition without any validation. The caller must ensure the following:
- The CRC stored in the FOTA info is valid.
Auto Trait Implementations§
impl Freeze for FotaPartition
impl RefUnwindSafe for FotaPartition
impl Send for FotaPartition
impl Sync for FotaPartition
impl Unpin for FotaPartition
impl UnwindSafe for FotaPartition
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
Mutably borrows from an owned value. Read more