pub struct PartitionTable {
pub addr: u32,
pub size: usize,
}
Expand description
Partition table info
Fields§
§addr: u32
Address of table
size: usize
Size 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 more