ble-peripheral-rust 0.2.0

A cross-platform Rust crate for building Bluetooth Low Energy peripherals
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::error::{self, Error, ErrorType};
use bluer::gatt::local::CharacteristicControl;
use uuid::Uuid;
#[derive(Debug)]
pub(crate) struct CharNotifyHandler {
    pub service_uuid: Uuid,
    pub characteristic_uuid: Uuid,
    pub control: CharacteristicControl,
}

impl From<bluer::Error> for error::Error {
    fn from(error: bluer::Error) -> Self {
        Error::from_string(error.to_string(), ErrorType::Bluez)
    }
}