pub fn read_partition_table<'a>(
    flash: &mut impl embedded_storage::Storage,
    storage: &'a mut [u8],
) -> Result<PartitionTable<'a>, Error> {
    flash
        .read(PARTITION_TABLE_OFFSET, storage)
        .map_err(|_e| Error::StorageError)?;

    PartitionTable::new(storage)
}
Read the partition table.

Pass an implementation of [embedded_storage::Storage] which can read from
the whole flash and provide storage to read the partition table into.
esp-bootloader-esp-idf/src/partitions.rs