Struct blurmock::fake_service::FakeBluetoothGATTService
source · pub struct FakeBluetoothGATTService {
id: Arc<Mutex<String>>,
device: Arc<FakeBluetoothDevice>,
gatt_characteristics: Arc<Mutex<Vec<Arc<FakeBluetoothGATTCharacteristic>>>>,
is_primary: Arc<Mutex<bool>>,
included_services: Arc<Mutex<Vec<Arc<FakeBluetoothGATTService>>>>,
uuid: Arc<Mutex<String>>,
}
Fields§
§id: Arc<Mutex<String>>
§device: Arc<FakeBluetoothDevice>
§gatt_characteristics: Arc<Mutex<Vec<Arc<FakeBluetoothGATTCharacteristic>>>>
§is_primary: Arc<Mutex<bool>>
§included_services: Arc<Mutex<Vec<Arc<FakeBluetoothGATTService>>>>
§uuid: Arc<Mutex<String>>
Implementations§
source§impl FakeBluetoothGATTService
impl FakeBluetoothGATTService
pub fn new( id: String, device: Arc<FakeBluetoothDevice>, gatt_characteristics: Vec<Arc<FakeBluetoothGATTCharacteristic>>, is_primary: bool, included_services: Vec<Arc<FakeBluetoothGATTService>>, uuid: String, ) -> Arc<FakeBluetoothGATTService>
pub fn new_empty( device: Arc<FakeBluetoothDevice>, service_id: String, ) -> Arc<FakeBluetoothGATTService>
pub fn get_id(&self) -> String
pub fn set_id(&self, value: String)
pub fn get_gatt_characteristic_structs( &self, ) -> Result<Vec<Arc<FakeBluetoothGATTCharacteristic>>, Box<dyn Error>>
pub fn is_primary(&self) -> Result<bool, Box<dyn Error>>
pub fn set_is_primary(&self, value: bool) -> Result<(), Box<dyn Error>>
pub fn set_includes( &self, value: Vec<Arc<FakeBluetoothGATTService>>, ) -> Result<(), Box<dyn Error>>
pub fn get_uuid(&self) -> Result<String, Box<dyn Error>>
pub fn set_uuid(&self, value: String) -> Result<(), Box<dyn Error>>
pub fn get_device(&self) -> Result<Arc<FakeBluetoothDevice>, Box<dyn Error>>
pub fn get_gatt_characteristics(&self) -> Result<Vec<String>, Box<dyn Error>>
pub fn get_gatt_characteristic( &self, id: String, ) -> Result<Arc<FakeBluetoothGATTCharacteristic>, Box<dyn Error>>
pub fn add_characteristic( &self, characteristic: Arc<FakeBluetoothGATTCharacteristic>, ) -> Result<(), Box<dyn Error>>
pub fn remove_characteristic(&self, id: String) -> Result<(), Box<dyn Error>>
pub fn add_included_service( &self, service: Arc<FakeBluetoothGATTService>, ) -> Result<(), Box<dyn Error>>
pub fn remove_included_service(&self, id: String) -> Result<(), Box<dyn Error>>
pub fn get_includes(&self) -> Result<Vec<String>, Box<dyn Error>>
Trait Implementations§
source§impl Clone for FakeBluetoothGATTService
impl Clone for FakeBluetoothGATTService
source§fn clone(&self) -> FakeBluetoothGATTService
fn clone(&self) -> FakeBluetoothGATTService
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 FakeBluetoothGATTService
impl RefUnwindSafe for FakeBluetoothGATTService
impl Send for FakeBluetoothGATTService
impl Sync for FakeBluetoothGATTService
impl Unpin for FakeBluetoothGATTService
impl UnwindSafe for FakeBluetoothGATTService
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