pub struct Filter {
pub service_uuid: Option<Uuid>,
pub service_data_uuid: Option<Uuid>,
pub manufacturer_id: Option<u16>,
pub connectable: Option<bool>,
pub name: Option<String>,
pub max_path_loss: Option<i8>,
/* private fields */
}
Expand description
Filter parameters for use during a scan. A discovered peer only matches the filter if it satisfies all of the present filter parameters.
Fields§
§service_uuid: Option<Uuid>
Filter based on advertised service UUID.
service_data_uuid: Option<Uuid>
Filter based on service data containing the given UUID.
manufacturer_id: Option<u16>
Filter based on a manufacturer identifier present in the manufacturer data. If this filter parameter is set, then the advertising payload must contain manufacturer specific data with the provided company identifier to satisfy this filter. Manufacturer identifiers can be found at https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers/
connectable: Option<bool>
Filter based on whether or not a device is connectable. For example, a client that is only interested in peripherals that it can connect to can set this to true. Similarly a client can scan only for broadcasters by setting this to false.
name: Option<String>
Filter results based on a portion of the advertised device name. Substring matches are allowed.
max_path_loss: Option<i8>
Filter results based on the path loss of the radio wave. A device that matches this filter must satisfy the following:
- Radio transmission power level and received signal strength must be available for the path loss calculation;
- The calculated path loss value must be less than, or equal to,
max_path_loss
.
NOTE: This field is calculated using the RSSI and TX Power information obtained from advertising and scan response data during a scan procedure. It should NOT be confused with information for an active connection obtained using the “Path Loss Reporting” feature.
Trait Implementations§
Source§impl<D: ResourceDialect> Decode<Filter, D> for Filter
impl<D: ResourceDialect> Decode<Filter, D> for Filter
Source§impl TypeMarker for Filter
impl TypeMarker for Filter
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.Source§impl ValueTypeMarker for Filter
impl ValueTypeMarker for Filter
impl Persistable for Filter
impl StructuralPartialEq for Filter
Auto Trait Implementations§
impl Freeze for Filter
impl RefUnwindSafe for Filter
impl Send for Filter
impl Sync for Filter
impl Unpin for Filter
impl UnwindSafe for Filter
Blanket Implementations§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
§type MarkerInResultUnion = T
type MarkerInResultUnion = T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)