pub struct ScanConfig { /* private fields */ }
Implementations§
Source§impl ScanConfig
impl ScanConfig
Sourcepub fn adapter_index(self, index: usize) -> Self
pub fn adapter_index(self, index: usize) -> Self
Index of bluetooth adapter to use
pub fn with_filters(self, filters: &[Filter]) -> Self
Sourcepub fn filter_by_address(
self,
func: impl Fn(&str, &str) -> bool + Send + Sync + 'static,
) -> Self
pub fn filter_by_address( self, func: impl Fn(&str, &str) -> bool + Send + Sync + 'static, ) -> Self
Filter scanned devices based on the device address
Sourcepub fn filter_by_name(
self,
func: impl Fn(&str, &str) -> bool + Send + Sync + 'static,
) -> Self
pub fn filter_by_name( self, func: impl Fn(&str, &str) -> bool + Send + Sync + 'static, ) -> Self
Filter scanned devices based on the device name
pub fn filter_by_rssi( self, func: impl Fn(i16, i16) -> bool + Send + Sync + 'static, ) -> Self
pub fn filter_by_service( self, func: impl Fn(&Vec<Uuid>, &Uuid) -> bool + Send + Sync + 'static, ) -> Self
Sourcepub fn filter_by_characteristics(
self,
func: impl Fn(&Vec<Uuid>, &Uuid) -> bool + Send + Sync + 'static,
) -> Self
pub fn filter_by_characteristics( self, func: impl Fn(&Vec<Uuid>, &Uuid) -> bool + Send + Sync + 'static, ) -> Self
Filter scanned devices based on available characteristics
Sourcepub fn stop_after_matches(self, max_results: usize) -> Self
pub fn stop_after_matches(self, max_results: usize) -> Self
Stop the scan after given number of matches
Sourcepub fn stop_after_first_match(self) -> Self
pub fn stop_after_first_match(self) -> Self
Stop the scan after the first match
Sourcepub fn stop_after_timeout(self, timeout: Duration) -> Self
pub fn stop_after_timeout(self, timeout: Duration) -> Self
Stop the scan after given duration
pub fn force_disconnect(self, force_disconnect: bool) -> Self
Sourcepub fn require_name(self) -> Self
pub fn require_name(self) -> Self
Require that the scanned devices have a name
Trait Implementations§
Source§impl Default for ScanConfig
impl Default for ScanConfig
Source§fn default() -> ScanConfig
fn default() -> ScanConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ScanConfig
impl !RefUnwindSafe for ScanConfig
impl Send for ScanConfig
impl Sync for ScanConfig
impl Unpin for ScanConfig
impl !UnwindSafe for ScanConfig
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