[−][src]Struct rustable::Advertisement
See the Advertising API for more details about what each field does.
Fields
typ: AdType
service_uuids: Vec<UUID>
manu_data: HashMap<u16, ([u8; 27], usize)>
serv_dict: HashMap<UUID, ([u8; 27], usize)>
solicit_uuids: Vec<UUID>
includes: Vec<String>
duration: u16
Defaults to 2
. Ignored if there is only one Advertisement active on the Bluez controller at once.
If there are multiple advertisements active on the Bluez controller at once
(including from other application), then they share time in a round-robin. This setting determines,
how long this advertisement will be active at a time in seconds, before handing of to the next
Advertisement.
timeout: u16
Defaults to 180
. The timeout of the advertisement in seconds. The timeout only counts time while the advertisement is active,
if there are multiple advertisement.
appearance: u16
localname: String
Implementations
impl Advertisement
[src]
pub fn new(typ: AdType, localname: String) -> Self
[src]
Creates a new advertisement that can be added the Bluetooth
and registered with Bluez
using Bluetooth::start_adv()
.
pub fn validate(&self) -> Result<(), Error>
[src]
Validates the UUIDs in the advertisement.
Auto Trait Implementations
impl !RefUnwindSafe for Advertisement
impl !Send for Advertisement
impl !Sync for Advertisement
impl Unpin for Advertisement
impl UnwindSafe for Advertisement
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,