pub struct UsedChain { /* private fields */ }
Expand description
Represents a chain returned by a device.
Implementations§
Source§impl UsedChain
impl UsedChain
Sourcepub fn written(&self) -> u32
pub fn written(&self) -> u32
Get the amount of data written to the chain.
This is the amount of data the device claimed it wrote to the chain and could be incorrect, for example some devices do not zero this field when they return a read only chain.
Sourcepub fn data_iter<'a>(&'a self) -> ChainDataIter<'a> ⓘ
pub fn data_iter<'a>(&'a self) -> ChainDataIter<'a> ⓘ
Iterate over any written portions.
Iterates over the writable portion of the descriptor chain, up to the amount that was
claimed to be written
. The iterator produces
(driver_addr as u64, length as u32)
tuples and it is the responsibility of the caller to
know if this range is valid and how to access it.
Auto Trait Implementations§
impl Freeze for UsedChain
impl RefUnwindSafe for UsedChain
impl Send for UsedChain
impl Sync for UsedChain
impl Unpin for UsedChain
impl UnwindSafe for UsedChain
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