[][src]Struct rustable::Advertisement

pub struct Advertisement {
    pub typ: AdType,
    pub service_uuids: Vec<UUID>,
    pub manu_data: HashMap<u16, ([u8; 27], usize)>,
    pub serv_dict: HashMap<UUID, ([u8; 27], usize)>,
    pub solicit_uuids: Vec<UUID>,
    pub includes: Vec<String>,
    pub duration: u16,
    pub timeout: u16,
    pub appearance: u16,
    pub localname: String,
    // some fields omitted
}

See the Advertising API for more details about what each field does.

Fields

typ: AdTypeservice_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: u16localname: 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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.