pub struct Storage {
nvme: Arc<NvmeController>,
}
Fields
nvme: Arc<NvmeController>
Implementations
Trait Implementations
sourceimpl FlashController<BLOCK_SIZE> for Storage
impl FlashController<BLOCK_SIZE> for Storage
sourcefn read_region(
&self,
region_number: usize,
offset: usize,
buf: &mut [u8; 4096]
) -> Result<(), ErrorCode>
fn read_region(
&self,
region_number: usize,
offset: usize,
buf: &mut [u8; 4096]
) -> Result<(), ErrorCode>
This function must read the data from the flash region specified by
region_number
into buf
. The length of the data read should be the
same length as buf. offset
indicates an offset into the region that
should be read. Read moresourcefn write(&self, address: usize, buf: &[u8]) -> Result<(), ErrorCode>
fn write(&self, address: usize, buf: &[u8]) -> Result<(), ErrorCode>
This function must write the length of
buf
to the specified address
in flash.
If the length of buf
is smaller then the minimum supported write size
the implementation can write a larger value. This should be done by first
reading the value, making the changed from buf
and then writing it back. Read moreAuto Trait Implementations
impl !DeviceSync for Storage
impl !ObjSafe for Storage
impl RefUnwindSafe for Storage
impl Send for Storage
impl Sync for Storage
impl Unpin for Storage
impl UnwindSafe for Storage
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more