Skip to content

Commit

Permalink
discovery filter: serde support
Browse files Browse the repository at this point in the history
  • Loading branch information
surban committed Feb 1, 2024
1 parent 3970f78 commit 54e10ed
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bluer/src/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,7 @@ pub enum AdapterEvent {
/// Transport parameter determines the type of scan.
#[cfg_attr(docsrs, doc(cfg(feature = "bluetoothd")))]
#[derive(Debug, Clone, Copy, Eq, PartialEq, Display, EnumString)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[non_exhaustive]
pub enum DiscoveryTransport {
/// interleaved scan
Expand All @@ -690,6 +691,7 @@ impl Default for DiscoveryTransport {
/// [duplicate data](Self::duplicate_data).
#[cfg_attr(docsrs, doc(cfg(feature = "bluetoothd")))]
#[derive(Default, Clone, Debug, Eq, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct DiscoveryFilter {
/// Filter by service UUIDs, empty means match
/// _any_ UUID.
Expand Down Expand Up @@ -761,6 +763,7 @@ pub struct DiscoveryFilter {
/// string "" pattern will match any device found.
pub pattern: Option<String>,
#[doc(hidden)]
#[cfg_attr(feature = "serde", serde(skip))]
pub _non_exhaustive: (),
}

Expand Down

0 comments on commit 54e10ed

Please sign in to comment.