#[non_exhaustive]pub enum HostEvent {
Advertisement(Arc<Report>),
PeriodicReport(Arc<PeriodicReport>),
PeriodicSyncLost {
sync: u16,
},
Connected(Connection),
Disconnected {
handle: u16,
peer: Address,
reason: u8,
},
AdvertisingStopped {
set: u8,
connection: Option<u16>,
},
ScanRequest {
set: u8,
scanner: Address,
},
Paired {
handle: u16,
identity: Address,
bonded: bool,
security: Security,
},
PairingFailed {
handle: u16,
reason: String,
},
GattWrite {
handle: u16,
attribute: u16,
value: Vec<u8>,
},
GattSubscription {
handle: u16,
attribute: u16,
notify: bool,
indicate: bool,
},
Stopped(String),
}Expand description
Something that happened, for the application.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Advertisement(Arc<Report>)
An advertisement (after duplicate filtering), with its scan response when there was one.
PeriodicReport(Arc<PeriodicReport>)
A periodic advertising report from a synchronized train.
PeriodicSyncLost
A periodic advertising train was lost.
Connected(Connection)
A new connection, in either role.
Disconnected
A connection closed.
Fields
AdvertisingStopped
An advertising set stopped: its duration ran out, it reached its event count, or (connectable) someone connected.
ScanRequest
A scanner sent a scan request to one of our sets (when asked for).
Paired
Pairing finished.
Fields
PairingFailed
Pairing failed.
GattWrite
A client wrote one of our GATT server’s characteristics.
Fields
GattSubscription
A client changed its notification or indication subscription.
Fields
Stopped(String)
The host stopped (the transport closed, or the controller failed).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for HostEvent
impl !UnwindSafe for HostEvent
impl Forget for HostEvent
impl Freeze for HostEvent
impl Move for HostEvent
impl Send for HostEvent
impl Sync for HostEvent
impl Unpin for HostEvent
impl UnsafeUnpin for HostEvent
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