pub struct Service {
pub uuid: BluetoothUuid,
pub primary: bool,
pub characteristics: Vec<Characteristic>,
}Expand description
A service to publish.
Fields§
§uuid: BluetoothUuidWhich service this is.
primary: boolPrimary rather than included in another service.
characteristics: Vec<Characteristic>Its characteristics. A service needs at least one.
Implementations§
Source§impl Service
impl Service
Sourcepub fn secondary(self) -> Self
pub fn secondary(self) -> Self
Make this a secondary (included) service rather than a primary one.
Sourcepub fn characteristic(self, characteristic: Characteristic) -> Self
pub fn characteristic(self, characteristic: Characteristic) -> Self
Add a characteristic. Add a characteristic to this service.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Service
impl Freeze for Service
impl Move for Service
impl RefUnwindSafe for Service
impl Send for Service
impl Sync for Service
impl Unpin for Service
impl UnsafeUnpin 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