Trait Controller

Source
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§

Source

fn write_acl_data( &self, packet: &AclPacket<'_>, ) -> impl Future<Output = Result<(), Self::Error>>

Write ACL data to the controller.

Source

fn write_sync_data( &self, packet: &SyncPacket<'_>, ) -> impl Future<Output = Result<(), Self::Error>>

Write Sync data to the controller.

Source

fn write_iso_data( &self, packet: &IsoPacket<'_>, ) -> impl Future<Output = Result<(), Self::Error>>

Write Iso data to the controller.

Source

fn read<'a>( &self, buf: &'a mut [u8], ) -> impl Future<Output = Result<ControllerToHostPacket<'a>, Self::Error>>

Read a valid HCI packet from 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.

Implementors§

Source§

impl<T, const SLOTS: usize> Controller for ExternalController<T, SLOTS>
where T: Transport,