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

Vol 2, Part E, Section 7.7.3

Vol 2, Part E, Section 7.7.5

Vol 2, Part E, Section 7.7.8

Vol 2, Part E, Section 7.7.12

Vol 2, Part E, Section 7.7.14

Vol 2, Part E, Section 7.7.15

Vol 2, Part E, Section 7.7.16

Vol 2, Part E, Section 7.7.19

Vol 2, Part E, Section 7.7.26

Vol 2, Part E, Section 7.7.39

Vol 2, Part E, Section 7.7.65.1

Vol 2, Part E, Section 7.7.65.2

Vol 2, Part E, Section 7.7.65.3

Vol 2, Part E, Section 7.7.65.4

Vol 2, Part E, Section 7.7.65.5

Vendor-specific events (opcode 0xFF)

Methods

impl<V> Event<V> where
    V: VendorEvent
[src]

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]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<V: Debug> Debug for Event<V> where
    V: VendorEvent,
    V::Status: Debug
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

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