pub trait RequestDriver {
    type Request: Copy + Send;
    type Response: Copy + Send;
    type SubmitError;

    const NUM_IDS: usize;

    // Required methods
    fn submit<'life0, 'life1, 'async_trait>(
        &'life0 self,
        reqs: &'life1 mut [SubmitRequest<Self::Request>]
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::SubmitError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn flush(&self);
}
Expand description

A trait implemented by a particular driver that can the be used by a requester::Requester.

Required Associated Types§

source

type Request: Copy + Send

The type of a request that will be used by the SubmitRequest wrapper to submit requests to the driver.

source

type Response: Copy + Send

The type of a response to a request that we will use to send back to the Requester via the requester::Requester::finish function.

source

type SubmitError

The type of a submit error in case submission fails.

Required Associated Constants§

source

const NUM_IDS: usize

The number of IDs to have in-flight at a time.

Required Methods§

source

fn submit<'life0, 'life1, 'async_trait>( &'life0 self, reqs: &'life1 mut [SubmitRequest<Self::Request>] ) -> Pin<Box<dyn Future<Output = Result<(), Self::SubmitError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The actual submit function. The driver should perform whatever device-specific submission procedure it needs to to submit all requests.

source

fn flush(&self)

Manually flush any internal driver submission queue.

Implementors§