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> 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