pub struct FakeBluetoothGATTCharacteristic {
id: Arc<Mutex<String>>,
uuid: Arc<Mutex<String>>,
service: Arc<FakeBluetoothGATTService>,
value: Arc<Mutex<Option<Vec<u8>>>>,
is_notifying: Arc<Mutex<bool>>,
flags: Arc<Mutex<Vec<String>>>,
gatt_descriptors: Arc<Mutex<Vec<Arc<FakeBluetoothGATTDescriptor>>>>,
}
Fields§
§id: Arc<Mutex<String>>
§uuid: Arc<Mutex<String>>
§service: Arc<FakeBluetoothGATTService>
§value: Arc<Mutex<Option<Vec<u8>>>>
§is_notifying: Arc<Mutex<bool>>
§flags: Arc<Mutex<Vec<String>>>
§gatt_descriptors: Arc<Mutex<Vec<Arc<FakeBluetoothGATTDescriptor>>>>
Implementations§
source§impl FakeBluetoothGATTCharacteristic
impl FakeBluetoothGATTCharacteristic
pub fn new( id: String, uuid: String, service: Arc<FakeBluetoothGATTService>, value: Option<Vec<u8>>, is_notifying: bool, flags: Vec<String>, gatt_descriptors: Vec<Arc<FakeBluetoothGATTDescriptor>>, ) -> Arc<FakeBluetoothGATTCharacteristic>
pub fn new_empty( service: Arc<FakeBluetoothGATTService>, characteristic_id: String, ) -> Arc<FakeBluetoothGATTCharacteristic>
pub fn get_id(&self) -> String
pub fn set_id(&self, value: String)
pub fn get_uuid(&self) -> Result<String, Box<dyn Error>>
pub fn set_uuid(&self, value: String) -> Result<(), Box<dyn Error>>
pub fn get_value(&self) -> Result<Vec<u8>, Box<dyn Error>>
pub fn set_value(&self, value: Option<Vec<u8>>) -> Result<(), Box<dyn Error>>
pub fn is_notifying(&self) -> Result<bool, Box<dyn Error>>
pub fn set_notifying(&self, value: bool) -> Result<(), Box<dyn Error>>
pub fn get_flags(&self) -> Result<Vec<String>, Box<dyn Error>>
pub fn set_flags(&self, value: Vec<String>) -> Result<(), Box<dyn Error>>
pub fn get_gatt_descriptor_structs( &self, ) -> Result<Vec<Arc<FakeBluetoothGATTDescriptor>>, Box<dyn Error>>
pub fn get_service( &self, ) -> Result<Arc<FakeBluetoothGATTService>, Box<dyn Error>>
pub fn start_notify(&self) -> Result<(), Box<dyn Error>>
pub fn stop_notify(&self) -> Result<(), Box<dyn Error>>
pub fn get_gatt_descriptors(&self) -> Result<Vec<String>, Box<dyn Error>>
pub fn get_gatt_descriptor( &self, id: String, ) -> Result<Arc<FakeBluetoothGATTDescriptor>, Box<dyn Error>>
pub fn add_descriptor( &self, descriptor: Arc<FakeBluetoothGATTDescriptor>, ) -> Result<(), Box<dyn Error>>
pub fn remove_descriptor(&self, id: String) -> Result<(), Box<dyn Error>>
pub fn read_value(&self) -> Result<Vec<u8>, Box<dyn Error>>
pub fn write_value(&self, value: Vec<u8>) -> Result<(), Box<dyn Error>>
Trait Implementations§
source§impl Clone for FakeBluetoothGATTCharacteristic
impl Clone for FakeBluetoothGATTCharacteristic
source§fn clone(&self) -> FakeBluetoothGATTCharacteristic
fn clone(&self) -> FakeBluetoothGATTCharacteristic
Returns a copy 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 FakeBluetoothGATTCharacteristic
impl RefUnwindSafe for FakeBluetoothGATTCharacteristic
impl Send for FakeBluetoothGATTCharacteristic
impl Sync for FakeBluetoothGATTCharacteristic
impl Unpin for FakeBluetoothGATTCharacteristic
impl UnwindSafe for FakeBluetoothGATTCharacteristic
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