pub trait AsyncLink: Send {
// Required methods
fn open<'life0, 'life1, 'async_trait>(
&'life0 mut self,
geometry: &'life1 Geometry,
) -> Pin<Box<dyn Future<Output = Result<(), LinkError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn close<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), LinkError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn send<'life0, 'life1, 'async_trait>(
&'life0 mut self,
tx: &'life1 [TxMessage],
) -> Pin<Box<dyn Future<Output = Result<(), LinkError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn receive<'life0, 'life1, 'async_trait>(
&'life0 mut self,
rx: &'life1 mut [RxMessage],
) -> Pin<Box<dyn Future<Output = Result<(), LinkError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn is_open(&self) -> bool;
}Available on crate features
async and link only.Expand description
A trait that provides the interface with the device.
Required Methods§
Sourcefn open<'life0, 'life1, 'async_trait>(
&'life0 mut self,
geometry: &'life1 Geometry,
) -> Pin<Box<dyn Future<Output = Result<(), LinkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn open<'life0, 'life1, 'async_trait>(
&'life0 mut self,
geometry: &'life1 Geometry,
) -> Pin<Box<dyn Future<Output = Result<(), LinkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Opens the link.
Sourcefn close<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), LinkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn close<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), LinkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Closes the link.
Sourcefn send<'life0, 'life1, 'async_trait>(
&'life0 mut self,
tx: &'life1 [TxMessage],
) -> Pin<Box<dyn Future<Output = Result<(), LinkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send<'life0, 'life1, 'async_trait>(
&'life0 mut self,
tx: &'life1 [TxMessage],
) -> Pin<Box<dyn Future<Output = Result<(), LinkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sends a message to the device.
Trait Implementations§
Source§impl AsyncLink for Box<dyn AsyncLink>
impl AsyncLink for Box<dyn AsyncLink>
Source§fn open<'life0, 'life1, 'async_trait>(
&'life0 mut self,
geometry: &'life1 Geometry,
) -> Pin<Box<dyn Future<Output = Result<(), LinkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn open<'life0, 'life1, 'async_trait>(
&'life0 mut self,
geometry: &'life1 Geometry,
) -> Pin<Box<dyn Future<Output = Result<(), LinkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Opens the link.
Source§fn close<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), LinkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn close<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), LinkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Closes the link.
Source§fn send<'life0, 'life1, 'async_trait>(
&'life0 mut self,
tx: &'life1 [TxMessage],
) -> Pin<Box<dyn Future<Output = Result<(), LinkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send<'life0, 'life1, 'async_trait>(
&'life0 mut self,
tx: &'life1 [TxMessage],
) -> Pin<Box<dyn Future<Output = Result<(), LinkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sends a message to the device.