pub struct DataPhase<'a> {
pub direction: DataDirection,
pub block_size: NonZeroU16,
pub block_count: NonZeroU32,
pub buffer: DataBuffer<'a>,
}Expand description
Optional data phase associated with a command.
Fields§
§direction: DataDirection§block_size: NonZeroU16§block_count: NonZeroU32§buffer: DataBuffer<'a>Implementations§
Source§impl<'a> DataPhase<'a>
impl<'a> DataPhase<'a>
pub fn read( block_size: NonZeroU16, block_count: NonZeroU32, buffer: &'a mut [u8], ) -> Result<Self, Error>
pub fn write( block_size: NonZeroU16, block_count: NonZeroU32, buffer: &'a [u8], ) -> Result<Self, Error>
pub fn dma( direction: DataDirection, block_size: NonZeroU16, block_count: NonZeroU32, buffer: PreparedDma, ) -> Result<Self, DmaPhaseError>
pub fn validate(&self) -> Result<(), Error>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for DataPhase<'a>
impl<'a> !UnwindSafe for DataPhase<'a>
impl<'a> Freeze for DataPhase<'a>
impl<'a> Send for DataPhase<'a>
impl<'a> Sync for DataPhase<'a>
impl<'a> Unpin for DataPhase<'a>
impl<'a> UnsafeUnpin for DataPhase<'a>
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