pub trait BleBackend<const MAX_PEERS: usize> {
type Error: Debug;
type Link: BleLink<Error = Self::Error>;
// Required methods
async fn set_advertising(
&mut self,
mode: AdvertisingMode,
) -> Result<(), Self::Error>;
async fn next_event(&mut self) -> BleEvent<Self::Link>;
async fn dial(&mut self, address: BleAddress) -> DialOutcome;
// Provided methods
fn blocked(&self) -> Option<&'static str> { ... }
async fn set_scanning(
&mut self,
_mode: ScanningMode,
) -> Result<(), Self::Error> { ... }
async fn set_radio_mode(
&mut self,
_mode: RadioMode,
) -> Result<(), Self::Error> { ... }
async fn local_capabilities(
&mut self,
configured: LinkCapabilities,
) -> Result<LinkCapabilities, Self::Error> { ... }
async fn on_link_closed(&mut self, _address: BleAddress) { ... }
}Required Associated Types§
Required Methods§
async fn set_advertising( &mut self, mode: AdvertisingMode, ) -> Result<(), Self::Error>
async fn next_event(&mut self) -> BleEvent<Self::Link>
async fn dial(&mut self, address: BleAddress) -> DialOutcome
Provided Methods§
Sourcefn blocked(&self) -> Option<&'static str>
fn blocked(&self) -> Option<&'static str>
A blocked backend is reported as a failed interface without bringing up the radio.
async fn set_scanning(&mut self, _mode: ScanningMode) -> Result<(), Self::Error>
async fn set_radio_mode(&mut self, _mode: RadioMode) -> Result<(), Self::Error>
async fn local_capabilities( &mut self, configured: LinkCapabilities, ) -> Result<LinkCapabilities, Self::Error>
async fn on_link_closed(&mut self, _address: BleAddress)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".