pub struct Service { /* private fields */ }
Expand description
A collection of data and associated behaviors that accomplish a function or feature of a device.
Services are either primary or secondary and may contain multiple characteristics or included services (references to other services).
Implementations§
Source§impl Service
impl Service
pub fn id(&self) -> Uuid
Sourcepub fn is_primary(&self) -> bool
pub fn is_primary(&self) -> bool
Indicates whether the type of service is primary or secondary.
A peripheral’s service is either primary or secondary. A primary service describes the primary function of a device. A secondary service describes a service that’s relevant only in the context of another service that references it. For example, the primary service of a heart rate monitor may be to expose heart rate data from the monitor’s heart rate sensor. In this example, a secondary service may be to expose the sensor’s battery data.
Trait Implementations§
impl Eq for 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