pub struct Service { /* private fields */ }Expand description
A GATT service of a Bluetooth LE device.
To enumerate Services, use Device::gatt_services.
Implementations§
Source§impl Service
impl Service
Sourcepub async fn is_primary(&self) -> Result<bool>
pub async fn is_primary(&self) -> Result<bool>
Sourcepub async fn characteristic(&self, uuid: Uuid) -> Result<Characteristic>
pub async fn characteristic(&self, uuid: Uuid) -> Result<Characteristic>
Returns the Characteristic associated with this Service identified by the given
Uuid.
Returns an error if the Service does not expose any Characteristic with the given
Uuid.
Sourcepub async fn characteristics(&self) -> Result<Vec<Characteristic>>
pub async fn characteristics(&self) -> Result<Vec<Characteristic>>
Returns a list of all Characteristics associated with this Service.
Auto Trait Implementations§
impl Freeze for Service
impl !RefUnwindSafe for Service
impl Send for Service
impl Sync for Service
impl Unpin for Service
impl !UnwindSafe for Service
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