[−][src]Trait toio::ble::PeripheralOps
The interface for platform-specific BLE peripheral.
Required methods
fn id(&self) -> &str
fn rssi(&self) -> i32
#[must_use]fn connect<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Connect to the peripheral.
#[must_use]fn disconnect<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Disconnect the peripheral.
#[must_use]fn read<'life0, 'life1, 'async_trait>(
&'life0 mut self,
uuid: &'life1 Uuid
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
&'life0 mut self,
uuid: &'life1 Uuid
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Send a read request.
#[must_use]fn write<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
uuid: &'life1 Uuid,
value: &'life2 [u8],
with_resp: bool
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
&'life0 mut self,
uuid: &'life1 Uuid,
value: &'life2 [u8],
with_resp: bool
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Write with/without response.
fn subscribe(&mut self) -> Result<ValueStream>
Subscribe to the peripheral.
Implementations on Foreign Types
impl<T: ?Sized> PeripheralOps for Box<T> where
T: PeripheralOps + Send,
[src]
T: PeripheralOps + Send,
fn id(&self) -> &str
[src]
fn rssi(&self) -> i32
[src]
fn connect<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn disconnect<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn read<'life0, 'life1, 'async_trait>(
&'life0 mut self,
uuid: &'life1 Uuid
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
uuid: &'life1 Uuid
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn write<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
uuid: &'life1 Uuid,
value: &'life2 [u8],
with_resp: bool
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
uuid: &'life1 Uuid,
value: &'life2 [u8],
with_resp: bool
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,