pub struct Advertising {
pub local_name: Option<String>,
pub services: Vec<BluetoothUuid>,
}Expand description
What to put in the advertisement.
Apple honours only a local name and a service UUID list in the peripheral role — no manufacturer data, no service data. The packet holds 28 bytes for everything; service UUIDs that do not fit go to the overflow area, where only an Apple device scanning for them explicitly will see them.
Fields§
§local_name: Option<String>The name to advertise, if any.
services: Vec<BluetoothUuid>Service UUIDs to advertise, which is what a central filters on.
Implementations§
Source§impl Advertising
impl Advertising
Sourcepub fn local_name(self, name: impl Into<String>) -> Self
pub fn local_name(self, name: impl Into<String>) -> Self
The name centrals will show.
Trait Implementations§
Source§impl Clone for Advertising
impl Clone for Advertising
Source§impl Debug for Advertising
impl Debug for Advertising
Auto Trait Implementations§
impl Freeze for Advertising
impl RefUnwindSafe for Advertising
impl Send for Advertising
impl Sync for Advertising
impl Unpin for Advertising
impl UnsafeUnpin for Advertising
impl UnwindSafe for Advertising
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