pub struct MscBlockDevice<'lun, 'dev, 'd, A, M, ALIGN>{ /* private fields */ }Expand description
block_device_driver::BlockDevice adapter for an MscLun.
Constructed by MscLun::as_block_device. The ALIGN type
parameter picks the buffer alignment required by the caller (for
example the DMA alignment of the downstream consumer). The
BlockDevice trait is implemented for every SIZE — the LUN’s
reported block size is validated on every call.
Trait Implementations§
Source§impl<'lun, 'dev, 'd, A, M, ALIGN, const SIZE: usize> BlockDevice<SIZE> for MscBlockDevice<'lun, 'dev, 'd, A, M, ALIGN>
Available on crate feature block-device-driver only.
impl<'lun, 'dev, 'd, A, M, ALIGN, const SIZE: usize> BlockDevice<SIZE> for MscBlockDevice<'lun, 'dev, 'd, A, M, ALIGN>
Available on crate feature
block-device-driver only.Source§async fn read(
&mut self,
block_address: u32,
data: &mut [Aligned<ALIGN, [u8; SIZE]>],
) -> Result<(), MscError>
async fn read( &mut self, block_address: u32, data: &mut [Aligned<ALIGN, [u8; SIZE]>], ) -> Result<(), MscError>
Read one or more blocks at the given block address.
Auto Trait Implementations§
impl<'lun, 'dev, 'd, A, M, ALIGN> !RefUnwindSafe for MscBlockDevice<'lun, 'dev, 'd, A, M, ALIGN>
impl<'lun, 'dev, 'd, A, M, ALIGN> !UnwindSafe for MscBlockDevice<'lun, 'dev, 'd, A, M, ALIGN>
impl<'lun, 'dev, 'd, A, M, ALIGN> Freeze for MscBlockDevice<'lun, 'dev, 'd, A, M, ALIGN>
impl<'lun, 'dev, 'd, A, M, ALIGN> Send for MscBlockDevice<'lun, 'dev, 'd, A, M, ALIGN>
impl<'lun, 'dev, 'd, A, M, ALIGN> Sync for MscBlockDevice<'lun, 'dev, 'd, A, M, ALIGN>
impl<'lun, 'dev, 'd, A, M, ALIGN> Unpin for MscBlockDevice<'lun, 'dev, 'd, A, M, ALIGN>
impl<'lun, 'dev, 'd, A, M, ALIGN> UnsafeUnpin for MscBlockDevice<'lun, 'dev, 'd, A, M, ALIGN>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more