pub struct FlashRegion<'a, 'd> { /* private fields */ }Expand description
A flash region is a “view” into the partition.
It allows to read and write to the partition without the need to account for the partition offset.
Implementations§
Source§impl<'a, 'd> FlashRegion<'a, 'd>
impl<'a, 'd> FlashRegion<'a, 'd>
Sourcepub fn partition_size(&self) -> usize
pub fn partition_size(&self) -> usize
Returns the size of the partition in bytes.
Sourcepub fn read(&mut self, offset: u32, bytes: &mut [u8]) -> Result<(), Error>
pub fn read(&mut self, offset: u32, bytes: &mut [u8]) -> Result<(), Error>
Read bytes from the partition.