pub trait Driver<P>: Send + Syncwhere
P: Cosmos,{
fn kind(&self) -> Kind;
fn item<'life0, 'life1, 'async_trait>(
&'life0 self,
point: &'life1 Point
) -> Pin<Box<dyn Future<Output = Result<ItemSphere<P>, P::Err>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn layer(&self) -> Layer { ... }
fn avail(&self) -> DriverAvail { ... }
fn bind(&self) -> ArtRef<BindConfig> { ... }
fn init<'life0, 'async_trait>(
&'life0 mut self,
skel: DriverSkel<P>,
ctx: DriverCtx
) -> Pin<Box<dyn Future<Output = Result<(), P::Err>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
fn handler<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Box<dyn DriverHandler<P>>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
fn add_driver<'life0, 'async_trait>(
&'life0 self,
_driver: DriverApi<P>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
}
This is sorta a hack, it only works for DriverDriver