Skip to main content

Interface

Trait Interface 

Source
pub trait Interface:
    Send
    + Sync
    + Unpin
    + 'static {
    type Orchestrator: Borrow<SessionManager<Self>> + Send + Sync;

    // Required methods
    fn get_info(&self) -> Cow<'_, DeviceInfo>;
    fn spawn_session(&self, session: Arc<Session<Self>>);
    fn on_requests(&self, requests: &[Request]);
}

Required Associated Types§

Required Methods§

Source

fn get_info(&self) -> Cow<'_, DeviceInfo>

Called to get block/partition information.

Source

fn spawn_session(&self, session: Arc<Session<Self>>)

Start running a new session. The interface must ensure that Session::run is called on a different thread.

Source

fn on_requests(&self, requests: &[Request])

Starts a batch of requests. The implementation may block if there are too many in-flight requests, providing pushback. The interface is responsible for eventually calling SessionManager::complete_request for each request.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§