Struct DiscoverableParameters

Source
pub struct DiscoverableParameters<'a, 'b> {
    pub advertising_type: AdvertisingType,
    pub advertising_interval: Option<(Duration, Duration)>,
    pub address_type: OwnAddressType,
    pub filter_policy: AdvertisingFilterPolicy,
    pub local_name: Option<LocalName<'a>>,
    pub advertising_data: &'b [u8],
    pub conn_interval: (Option<Duration>, Option<Duration>),
}
Expand description

Parameters for the set_limited_discoverable and set_discoverable commands.

Fields§

§advertising_type: AdvertisingType

Advertising method for the device.

Must be ConnectableUndirected, ScannableUndirected, or NonConnectableUndirected.

§advertising_interval: Option<(Duration, Duration)>

Range of advertising for non-directed advertising.

If not provided, the GAP will use default values (1.28 seconds).

Range for both limits: 20 ms to 10.24 seconds. The second value must be greater than or equal to the first.

§address_type: OwnAddressType

Address type for this device.

§filter_policy: AdvertisingFilterPolicy

Filter policy for this device.

§local_name: Option<LocalName<'a>>

Name of the device.

§advertising_data: &'b [u8]

Service UUID list as defined in the Bluetooth spec, v4.1, Vol 3, Part C, Section 11.

Must be 31 bytes or fewer.

§conn_interval: (Option<Duration>, Option<Duration>)

Expected length of the connection to the peripheral.

Auto Trait Implementations§

§

impl<'a, 'b> Freeze for DiscoverableParameters<'a, 'b>

§

impl<'a, 'b> RefUnwindSafe for DiscoverableParameters<'a, 'b>

§

impl<'a, 'b> Send for DiscoverableParameters<'a, 'b>

§

impl<'a, 'b> Sync for DiscoverableParameters<'a, 'b>

§

impl<'a, 'b> Unpin for DiscoverableParameters<'a, 'b>

§

impl<'a, 'b> UnwindSafe for DiscoverableParameters<'a, 'b>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.