pub trait ReadStorage {
    type Error;

    // Required methods
    fn read(&mut self, offset: u32, bytes: &mut [u8]) -> Result<(), Self::Error>;
    fn capacity(&self) -> usize;
}
Expand description

Transparent read only storage trait

Required Associated Types§

source

type Error

An enumeration of storage errors

Required Methods§

source

fn read(&mut self, offset: u32, bytes: &mut [u8]) -> Result<(), Self::Error>

Read a slice of data from the storage peripheral, starting the read operation at the given address offset, and reading bytes.len() bytes.

This should throw an error in case bytes.len() will be larger than self.capacity() - offset.

source

fn capacity(&self) -> usize

The capacity of the storage peripheral in bytes.

Implementors§

source§

impl<'a, S> ReadStorage for RmwMultiwriteNorFlashStorage<'a, S>
where S: ReadNorFlash,

§

type Error = <S as ErrorType>::Error

source§

impl<'a, S> ReadStorage for RmwNorFlashStorage<'a, S>
where S: ReadNorFlash,

§

type Error = <S as ErrorType>::Error