pub struct FakeBluetoothGATTDescriptor {
id: Arc<Mutex<String>>,
uuid: Arc<Mutex<String>>,
characteristic: Arc<FakeBluetoothGATTCharacteristic>,
value: Arc<Mutex<Option<Vec<u8>>>>,
flags: Arc<Mutex<Vec<String>>>,
}
Fields§
§id: Arc<Mutex<String>>
§uuid: Arc<Mutex<String>>
§characteristic: Arc<FakeBluetoothGATTCharacteristic>
§value: Arc<Mutex<Option<Vec<u8>>>>
§flags: Arc<Mutex<Vec<String>>>
Implementations§
source§impl FakeBluetoothGATTDescriptor
impl FakeBluetoothGATTDescriptor
pub fn new( id: String, uuid: String, characteristic: Arc<FakeBluetoothGATTCharacteristic>, value: Option<Vec<u8>>, flags: Vec<String>, ) -> Arc<FakeBluetoothGATTDescriptor>
pub fn new_empty( characteristic: Arc<FakeBluetoothGATTCharacteristic>, descriptor_id: String, ) -> Arc<FakeBluetoothGATTDescriptor>
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 get_flags(&self) -> Result<Vec<String>, Box<dyn Error>>
pub fn set_flags(&self, value: Vec<String>) -> Result<(), Box<dyn Error>>
pub fn get_characteristic( &self, ) -> Result<Arc<FakeBluetoothGATTCharacteristic>, 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 FakeBluetoothGATTDescriptor
impl Clone for FakeBluetoothGATTDescriptor
source§fn clone(&self) -> FakeBluetoothGATTDescriptor
fn clone(&self) -> FakeBluetoothGATTDescriptor
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 FakeBluetoothGATTDescriptor
impl RefUnwindSafe for FakeBluetoothGATTDescriptor
impl Send for FakeBluetoothGATTDescriptor
impl Sync for FakeBluetoothGATTDescriptor
impl Unpin for FakeBluetoothGATTDescriptor
impl UnwindSafe for FakeBluetoothGATTDescriptor
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