pub unsafe trait IQueue: Send + 'static {
// Required methods
fn id(&self) -> usize;
fn info(&self) -> QueueInfo;
fn submit_request(
&mut self,
request: Request<'_>,
) -> Result<RequestId, BlkError>;
fn poll_request(
&mut self,
request: RequestId,
) -> Result<RequestStatus, BlkError>;
}Expand description
A request queue for one block device hardware/software queue.
§Safety
Implementers may access Request segments after submit_request returns
and until the matching poll_request returns RequestStatus::Complete or
an error. They must not access any segment before submit_request is called
or after completion/error has been reported, and request IDs must not alias
two concurrently pending requests in a way that extends this lifetime.
Required Methods§
fn id(&self) -> usize
fn info(&self) -> QueueInfo
fn submit_request( &mut self, request: Request<'_>, ) -> Result<RequestId, BlkError>
fn poll_request( &mut self, request: RequestId, ) -> Result<RequestStatus, BlkError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".