Enum bluetooth_hci::event::Event [−][src]
pub enum Event<V> where
V: VendorEvent, { ConnectionComplete(ConnectionComplete<V::Status>), DisconnectionComplete(DisconnectionComplete<V::Status>), EncryptionChange(EncryptionChange<V::Status>), ReadRemoteVersionInformationComplete(RemoteVersionInformation<V::Status>), CommandComplete(CommandComplete<V>), CommandStatus(CommandStatus<V::Status>), HardwareError(HardwareError), NumberOfCompletedPackets(NumberOfCompletedPackets), DataBufferOverflow(DataBufferOverflow), EncryptionKeyRefreshComplete(EncryptionKeyRefreshComplete<V::Status>), LeConnectionComplete(LeConnectionComplete<V::Status>), LeAdvertisingReport(LeAdvertisingReport), LeConnectionUpdateComplete(LeConnectionUpdateComplete<V::Status>), LeReadRemoteUsedFeaturesComplete(LeReadRemoteUsedFeaturesComplete<V::Status>), LeLongTermKeyRequest(LeLongTermKeyRequest), Vendor(V), }
Potential events that can be generated by the controller.
See the Bluetooth Spec v4.1, Vol 2, Part E, Section 7.7 for a description of each event. The events are the same for versions 4.1, 4.2, and 5.0 except where noted.
The spec defines an "LE Meta-Event" event. This event is not exposed directly. Instead, individual LE events are included in this enum.
Variants
ConnectionComplete(ConnectionComplete<V::Status>)
Vol 2, Part E, Section 7.7.3
DisconnectionComplete(DisconnectionComplete<V::Status>)
Vol 2, Part E, Section 7.7.5
EncryptionChange(EncryptionChange<V::Status>)
Vol 2, Part E, Section 7.7.8
ReadRemoteVersionInformationComplete(RemoteVersionInformation<V::Status>)
Vol 2, Part E, Section 7.7.12
CommandComplete(CommandComplete<V>)
Vol 2, Part E, Section 7.7.14
CommandStatus(CommandStatus<V::Status>)
Vol 2, Part E, Section 7.7.15
HardwareError(HardwareError)
Vol 2, Part E, Section 7.7.16
NumberOfCompletedPackets(NumberOfCompletedPackets)
Vol 2, Part E, Section 7.7.19
DataBufferOverflow(DataBufferOverflow)
Vol 2, Part E, Section 7.7.26
EncryptionKeyRefreshComplete(EncryptionKeyRefreshComplete<V::Status>)
Vol 2, Part E, Section 7.7.39
LeConnectionComplete(LeConnectionComplete<V::Status>)
Vol 2, Part E, Section 7.7.65.1
LeAdvertisingReport(LeAdvertisingReport)
Vol 2, Part E, Section 7.7.65.2
LeConnectionUpdateComplete(LeConnectionUpdateComplete<V::Status>)
Vol 2, Part E, Section 7.7.65.3
LeReadRemoteUsedFeaturesComplete(LeReadRemoteUsedFeaturesComplete<V::Status>)
Vol 2, Part E, Section 7.7.65.4
LeLongTermKeyRequest(LeLongTermKeyRequest)
Vol 2, Part E, Section 7.7.65.5
Vendor(V)
Vendor-specific events (opcode 0xFF)
Methods
impl<V> Event<V> where
V: VendorEvent,
[src]
impl<V> Event<V> where
V: VendorEvent,
pub fn new(packet: Packet) -> Result<Event<V>, Error<V::Error>>
[src]
pub fn new(packet: Packet) -> Result<Event<V>, Error<V::Error>>
Deserializes an event from the given packet. The packet should contain all of the data needed to deserialize the event.
Errors
UnknownEvent
error if the first byte of the header is not a recognized event type. This includes events that may be valid BLE events, but are not yet be implemented by this crate.BadLength
error if the length of the packet is not sufficient to either (1) contain a packet header, or (2) contain the packet data as defined by the header.- Other errors if the particular event cannot be correctly deserialized from the packet. This includes vendor-specific errors for vendor events.
Trait Implementations
impl<V: Clone> Clone for Event<V> where
V: VendorEvent,
V::Status: Clone,
[src]
impl<V: Clone> Clone for Event<V> where
V: VendorEvent,
V::Status: Clone,
fn clone(&self) -> Event<V>
[src]
fn clone(&self) -> Event<V>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<V: Debug> Debug for Event<V> where
V: VendorEvent,
V::Status: Debug,
[src]
impl<V: Debug> Debug for Event<V> where
V: VendorEvent,
V::Status: Debug,
Auto Trait Implementations
impl<V> Send for Event<V> where
V: Send,
<V as VendorEvent>::ReturnParameters: Send,
<V as VendorEvent>::Status: Send,
impl<V> Send for Event<V> where
V: Send,
<V as VendorEvent>::ReturnParameters: Send,
<V as VendorEvent>::Status: Send,
impl<V> Sync for Event<V> where
V: Sync,
<V as VendorEvent>::ReturnParameters: Sync,
<V as VendorEvent>::Status: Sync,
impl<V> Sync for Event<V> where
V: Sync,
<V as VendorEvent>::ReturnParameters: Sync,
<V as VendorEvent>::Status: Sync,