Struct esp_partition_table::PartitionTable
source · 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>>where
S: ReadStorage,
T: FromIterator<PartitionEntry>,
pub fn read_storage<S, T>( &self, storage: &mut S, check_md5: Option<bool> ) -> Result<T, StorageOpError<S>>where S: ReadStorage, T: FromIterator<PartitionEntry>,
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>>where
S: ReadNorFlash,
T: FromIterator<PartitionEntry>,
pub fn read_nor_flash<S, T>( &self, storage: &mut S, check_md5: Option<bool> ) -> Result<T, NorFlashOpError<S>>where S: ReadNorFlash, T: FromIterator<PartitionEntry>,
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<PartitionTable> for PartitionTable
impl PartialEq<PartitionTable> for PartitionTable
source§fn eq(&self, other: &PartitionTable) -> bool
fn eq(&self, other: &PartitionTable) -> bool
self and other values to be equal, and is used
by ==.