pub struct ScanFilter {
pub service_uuids: Option<Vec<String>>,
pub service_data_uuids: Option<Vec<String>>,
pub manufacturer_identifier: Option<Box<UInt16>>,
pub connectable: Option<Box<Bool>>,
pub name_substring: Option<String>,
pub max_path_loss: Option<Box<Int8>>,
}
Expand description
Filter parameters for use during a scan. A discovered peripheral or broadcaster will be reported to applications only if it satisfies all of the provided filter parameters. Null fields will be ignored.
Fields§
§service_uuids: Option<Vec<String>>
Filter based on advertised service UUIDs. A peripheral that advertises at least one of the
entries in service_uuids
will satisfy this filter.
service_data_uuids: Option<Vec<String>>
Filter based on service data containing one of the given UUIDs.
manufacturer_identifier: Option<Box<UInt16>>
Filter based on a company 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.
connectable: Option<Box<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 braodcasters by setting this to false.
name_substring: Option<String>
Filter results based on a portion of the advertised device name.
max_path_loss: Option<Box<Int8>>
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
.
Trait Implementations§
Source§impl Clone for ScanFilter
impl Clone for ScanFilter
Source§fn clone(&self) -> ScanFilter
fn clone(&self) -> ScanFilter
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ScanFilter
impl Debug for ScanFilter
Source§impl<D: ResourceDialect> Decode<ScanFilter, D> for ScanFilter
impl<D: ResourceDialect> Decode<ScanFilter, D> for ScanFilter
Source§impl<D: ResourceDialect> Encode<ScanFilter, D> for &ScanFilter
impl<D: ResourceDialect> Encode<ScanFilter, D> for &ScanFilter
Source§impl<D: ResourceDialect, T0: Encode<Optional<UnboundedVector<BoundedString<36>>>, D>, T1: Encode<Optional<UnboundedVector<BoundedString<36>>>, D>, T2: Encode<Boxed<UInt16>, D>, T3: Encode<Boxed<Bool>, D>, T4: Encode<Optional<BoundedString<248>>, D>, T5: Encode<Boxed<Int8>, D>> Encode<ScanFilter, D> for (T0, T1, T2, T3, T4, T5)
impl<D: ResourceDialect, T0: Encode<Optional<UnboundedVector<BoundedString<36>>>, D>, T1: Encode<Optional<UnboundedVector<BoundedString<36>>>, D>, T2: Encode<Boxed<UInt16>, D>, T3: Encode<Boxed<Bool>, D>, T4: Encode<Optional<BoundedString<248>>, D>, T5: Encode<Boxed<Int8>, D>> Encode<ScanFilter, D> for (T0, T1, T2, T3, T4, T5)
Source§impl PartialEq for ScanFilter
impl PartialEq for ScanFilter
Source§impl TypeMarker for ScanFilter
impl TypeMarker for ScanFilter
Source§type Owned = ScanFilter
type Owned = ScanFilter
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 ScanFilter
impl ValueTypeMarker for ScanFilter
Source§type Borrowed<'a> = &'a ScanFilter
type Borrowed<'a> = &'a ScanFilter
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Persistable for ScanFilter
impl StructuralPartialEq for ScanFilter
Auto Trait Implementations§
impl Freeze for ScanFilter
impl RefUnwindSafe for ScanFilter
impl Send for ScanFilter
impl Sync for ScanFilter
impl Unpin for ScanFilter
impl UnwindSafe for ScanFilter
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
)