pub struct PartitionTable {
pub addr: u32,
pub size: usize,
}Expand description
Partition table info
Fields§
§addr: u32Address of table
size: usizeSize of table
Implementations§
source§impl PartitionTable
impl PartitionTable
sourcepub const DEFAULT_ADDR: u32 = 32_768u32
pub const DEFAULT_ADDR: u32 = 32_768u32
Address of partition table
sourcepub const MAX_ENTRIES: usize = 128usize
pub const MAX_ENTRIES: usize = 128usize
Maxumum number of partition entries
source§impl PartitionTable
impl PartitionTable
sourcepub fn iter_storage<'s, S>(
&self,
storage: &'s mut S,
calc_md5: bool,
) -> PartitionStorageIter<'s, S> ⓘwhere
S: ReadStorage,
pub fn iter_storage<'s, S>(
&self,
storage: &'s mut S,
calc_md5: bool,
) -> PartitionStorageIter<'s, S> ⓘwhere
S: ReadStorage,
Get iterator over partitions from table
If md5 feature isn’t enabled calc_md5 argument will be ignored.
sourcepub fn read_storage<S, T>(
&self,
storage: &mut S,
check_md5: Option<bool>,
) -> Result<T, StorageOpError<S>>
pub fn read_storage<S, T>( &self, storage: &mut S, check_md5: Option<bool>, ) -> Result<T, StorageOpError<S>>
Read partitions from table
The check_md5 argument means following:
- None - ignore MD5 checksum
- Some(false) - check MD5 when found (optional MD5)
- Some(true) - MD5 checksum is mandatory
If md5 feature isn’t enabled check_md5 argument will be ignored.
sourcepub fn write_storage<S>(
&self,
storage: &mut S,
partitions: impl IntoIterator<Item = impl AsRef<PartitionEntry>>,
write_md5: bool,
) -> Result<usize, StorageOpError<S>>where
S: Storage,
pub fn write_storage<S>(
&self,
storage: &mut S,
partitions: impl IntoIterator<Item = impl AsRef<PartitionEntry>>,
write_md5: bool,
) -> Result<usize, StorageOpError<S>>where
S: Storage,
Write partitions into table
If md5 feature isn’t enabled write_md5 argument will be ignored.
source§impl PartitionTable
impl PartitionTable
sourcepub fn iter_nor_flash<'s, S>(
&self,
storage: &'s mut S,
calc_md5: bool,
) -> PartitionNorFlashIter<'s, S> ⓘwhere
S: ReadNorFlash,
pub fn iter_nor_flash<'s, S>(
&self,
storage: &'s mut S,
calc_md5: bool,
) -> PartitionNorFlashIter<'s, S> ⓘwhere
S: ReadNorFlash,
Get iterator over partitions from table
If md5 feature isn’t enabled calc_md5 argument will be ignored.
sourcepub fn read_nor_flash<S, T>(
&self,
storage: &mut S,
check_md5: Option<bool>,
) -> Result<T, NorFlashOpError<S>>
pub fn read_nor_flash<S, T>( &self, storage: &mut S, check_md5: Option<bool>, ) -> Result<T, NorFlashOpError<S>>
Read partitions from table
The check_md5 argument means following:
- None - ignore MD5 checksum
- Some(false) - check MD5 when found (optional MD5)
- Some(true) - MD5 checksum is mandatory
If md5 feature isn’t enabled check_md5 argument will be ignored.
sourcepub fn write_nor_flash<S>(
&self,
storage: &mut S,
partitions: impl IntoIterator<Item = impl AsRef<PartitionEntry>>,
write_md5: bool,
) -> Result<usize, NorFlashOpError<S>>where
S: NorFlash,
pub fn write_nor_flash<S>(
&self,
storage: &mut S,
partitions: impl IntoIterator<Item = impl AsRef<PartitionEntry>>,
write_md5: bool,
) -> Result<usize, NorFlashOpError<S>>where
S: NorFlash,
Write partitions into table
If md5 feature isn’t enabled write_md5 argument will be ignored.
Trait Implementations§
source§impl Clone for PartitionTable
impl Clone for PartitionTable
source§fn clone(&self) -> PartitionTable
fn clone(&self) -> PartitionTable
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for PartitionTable
impl Debug for PartitionTable
source§impl Default for PartitionTable
impl Default for PartitionTable
source§impl PartialEq for PartitionTable
impl PartialEq for PartitionTable
impl Copy for PartitionTable
impl Eq for PartitionTable
impl StructuralPartialEq for PartitionTable
Auto Trait Implementations§
impl Freeze for PartitionTable
impl RefUnwindSafe for PartitionTable
impl Send for PartitionTable
impl Sync for PartitionTable
impl Unpin for PartitionTable
impl UnwindSafe for PartitionTable
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)