[][src]Trait toio::ble::PeripheralOps

pub trait PeripheralOps {
    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
;
#[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
;
#[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
;
#[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
;
fn subscribe(&mut self) -> Result<ValueStream>; }

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, 

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, 

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, 

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, 

Write with/without response.

fn subscribe(&mut self) -> Result<ValueStream>

Subscribe to the peripheral.

Loading content...

Implementations on Foreign Types

impl<T: ?Sized> PeripheralOps for Box<T> where
    T: PeripheralOps + Send
[src]

Loading content...

Implementors

Loading content...