pub trait Controller: ErrorType {
// Required methods
fn write_acl_data(
&self,
packet: &AclPacket<'_>,
) -> impl Future<Output = Result<(), Self::Error>>;
fn write_sync_data(
&self,
packet: &SyncPacket<'_>,
) -> impl Future<Output = Result<(), Self::Error>>;
fn write_iso_data(
&self,
packet: &IsoPacket<'_>,
) -> impl Future<Output = Result<(), Self::Error>>;
fn read<'a>(
&self,
buf: &'a mut [u8],
) -> impl Future<Output = Result<ControllerToHostPacket<'a>, Self::Error>>;
}
Expand description
Trait representing a HCI controller which supports async operations.
Required Methods§
Sourcefn write_acl_data(
&self,
packet: &AclPacket<'_>,
) -> impl Future<Output = Result<(), Self::Error>>
fn write_acl_data( &self, packet: &AclPacket<'_>, ) -> impl Future<Output = Result<(), Self::Error>>
Write ACL data to the controller.
Sourcefn write_sync_data(
&self,
packet: &SyncPacket<'_>,
) -> impl Future<Output = Result<(), Self::Error>>
fn write_sync_data( &self, packet: &SyncPacket<'_>, ) -> impl Future<Output = Result<(), Self::Error>>
Write Sync data to the controller.
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.