pub trait DriverChainBuffer: Debug {
type Error;
// Required methods
fn device_readable_len(&self) -> u64;
fn device_writable_len(&self) -> u64;
fn write_device_readable(
&mut self,
offset: u64,
source: &[u8],
) -> Result<(), Self::Error>;
fn read_device_writable(
&self,
offset: u64,
target: &mut [u8],
) -> Result<(), Self::Error>;
}Expand description
Driver-owned byte access for one unpublished or reclaimed descriptor chain.
The readable side is written by the driver and later read by the device. The writable side is written by the device and may be read by the driver only after used-ring reclamation. Methods are nonblocking and allocation-free; queue ownership prevents calls while a chain is published.
Required Associated Types§
Required Methods§
Sourcefn device_readable_len(&self) -> u64
fn device_readable_len(&self) -> u64
Total bytes readable by the device.
Sourcefn device_writable_len(&self) -> u64
fn device_writable_len(&self) -> u64
Total bytes writable by the device.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".