pub struct DriverChain { /* private fields */ }Expand description
Driver-owned descriptor chain and buffers.
Construction allocates metadata proportional only to the caller-provided descriptor vector. Queue publication, completion, and reset do not allocate or copy payload bytes.
Implementations§
Source§impl DriverChain
impl DriverChain
Sourcepub fn direct(descriptors: Vec<Descriptor>) -> Result<Self, ChainBuildError>
pub fn direct(descriptors: Vec<Descriptor>) -> Result<Self, ChainBuildError>
Construct a valid direct chain linked in vector order.
Sourcepub fn raw(
descriptors: Vec<Descriptor>,
head: u16,
) -> Result<Self, ChainBuildError>
pub fn raw( descriptors: Vec<Descriptor>, head: u16, ) -> Result<Self, ChainBuildError>
Construct a raw descriptor table for deterministic malformed-chain injection.
next values are local indices in descriptors. Structural errors are retained and later
exposed by SplitDeviceChain::io when the chain is injected into a queue.
Sourcepub fn descriptor_count(&self) -> u16
pub fn descriptor_count(&self) -> u16
Number of descriptor-table entries owned by this chain.
Sourcepub fn validation(&self) -> Result<ChainLayout, MalformedChain>
pub fn validation(&self) -> Result<ChainLayout, MalformedChain>
Validate descriptor topology independently of a queue’s configured chain limit.
Trait Implementations§
Source§impl Debug for DriverChain
impl Debug for DriverChain
Source§impl DriverChainBuffer for DriverChain
impl DriverChainBuffer for DriverChain
Source§fn device_readable_len(&self) -> u64
fn device_readable_len(&self) -> u64
Total bytes readable by the device.
Source§fn device_writable_len(&self) -> u64
fn device_writable_len(&self) -> u64
Total bytes writable by the device.
Auto Trait Implementations§
impl !RefUnwindSafe for DriverChain
impl !Send for DriverChain
impl !Sync for DriverChain
impl !UnwindSafe for DriverChain
impl Freeze for DriverChain
impl Unpin for DriverChain
impl UnsafeUnpin for DriverChain
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