pub trait IQueue: Send + 'static {
// Required methods
fn id(&self) -> usize;
fn num_blocks(&self) -> usize;
fn block_size(&self) -> usize;
fn buff_config(&self) -> BuffConfig;
fn submit_request(
&mut self,
request: Request<'_>,
) -> Result<RequestId, BlkError>;
fn poll_request(&mut self, request: RequestId) -> Result<(), BlkError>;
}Expand description
Read queue trait for block devices.
Required Methods§
Sourcefn num_blocks(&self) -> usize
fn num_blocks(&self) -> usize
Get the total number of blocks available.
Sourcefn block_size(&self) -> usize
fn block_size(&self) -> usize
Get the size of each block in bytes.
Sourcefn buff_config(&self) -> BuffConfig
fn buff_config(&self) -> BuffConfig
Get the buffer configuration for this queue.