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§
type Orchestrator: Borrow<SessionManager<Self>> + Send + Sync
Required Methods§
Sourcefn get_info(&self) -> Cow<'_, DeviceInfo>
fn get_info(&self) -> Cow<'_, DeviceInfo>
Called to get block/partition information.
Sourcefn spawn_session(&self, session: Arc<Session<Self>>)
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.
Sourcefn on_requests(&self, requests: &[Request])
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.