pub struct BluerConnection { /* private fields */ }Expand description
BlueZ connection wrapper
Wraps a bluer::Device with connection state tracking.
Implementations§
Source§impl BluerConnection
impl BluerConnection
Sourcepub async fn update_rssi(&self)
pub async fn update_rssi(&self)
Update RSSI from device
Sourcepub async fn disconnect(&self) -> Result<()>
pub async fn disconnect(&self) -> Result<()>
Disconnect from the device
Sourcepub async fn discover_services(&self) -> Result<()>
pub async fn discover_services(&self) -> Result<()>
Discover GATT services
Sourcepub async fn read_characteristic(
&self,
service_uuid: Uuid,
char_uuid: Uuid,
) -> Result<Vec<u8>>
pub async fn read_characteristic( &self, service_uuid: Uuid, char_uuid: Uuid, ) -> Result<Vec<u8>>
Read a characteristic value
Trait Implementations§
Source§impl BleConnection for BluerConnection
impl BleConnection for BluerConnection
Source§fn connected_duration(&self) -> Duration
fn connected_duration(&self) -> Duration
Get connection duration
Source§impl Clone for BluerConnection
impl Clone for BluerConnection
Source§fn clone(&self) -> BluerConnection
fn clone(&self) -> BluerConnection
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BluerConnection
impl !RefUnwindSafe for BluerConnection
impl Send for BluerConnection
impl Sync for BluerConnection
impl Unpin for BluerConnection
impl !UnwindSafe for BluerConnection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more