pub trait Driver {
type RxError;
type TxError;
// Required methods
fn init(&mut self) -> impl Future<Output = ()>;
fn receive_message(
&mut self,
) -> impl Future<Output = Result<Option<Message>, Self::RxError>>;
fn send_message(
&mut self,
header: Header,
payload: &[u8],
) -> impl Future<Output = Result<(), Self::TxError>>;
fn state(&mut self) -> DriverState;
}
Required Associated Types§
Required Methods§
fn init(&mut self) -> impl Future<Output = ()>
fn receive_message( &mut self, ) -> impl Future<Output = Result<Option<Message>, Self::RxError>>
fn send_message( &mut self, header: Header, payload: &[u8], ) -> impl Future<Output = Result<(), Self::TxError>>
fn state(&mut self) -> DriverState
Object Safety§
This trait is not object safe.