[][src]Trait podo_core_driver::Driver

pub trait Driver where
    Self: Send + Sync
{ fn status(&self) -> Result<DriverState, RuntimeError>; fn call(&self, func: &str, value: &Resource) -> Result<(), RuntimeError> { ... }
fn with(&self, value: &Resource) -> Result<Option<ArcDriver>, RuntimeError> { ... }
fn hibernate(&self) -> Result<(), RuntimeError> { ... }
fn wake_up(&self) -> Result<(), RuntimeError> { ... }
fn enter(&self) -> Result<(), RuntimeError> { ... }
fn exit(&self) -> Result<(), RuntimeError> { ... } }

Required methods

fn status(&self) -> Result<DriverState, RuntimeError>

Load the driver's current state.

If there is a shortage of physical resources, hibernate drivers that are not needed.

Loading content...

Provided methods

fn call(&self, func: &str, value: &Resource) -> Result<(), RuntimeError>

fn with(&self, value: &Resource) -> Result<Option<ArcDriver>, RuntimeError>

fn hibernate(&self) -> Result<(), RuntimeError>

Hibernate the driver.

The hibernating driver must unload the heavy data from memory and be able to reload it in the wake.

fn wake_up(&self) -> Result<(), RuntimeError>

Wake the hibernating driver.

note: This function will never be called if it is already awake.

fn enter(&self) -> Result<(), RuntimeError>

Inform the driver that a work will use it.

fn exit(&self) -> Result<(), RuntimeError>

Inform the driver that the work is completed.

Loading content...

Implementors

Loading content...