[][src]Enum bluetooth_hci::event::Event

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)

Implementations

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

pub fn new(packet: Packet) -> Result<Event<V>, Error<V::Error>>[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,
    V::Status: Clone,
    V::Status: Clone,
    V::Status: Clone,
    V::Status: Clone,
    V::Status: Clone,
    V::Status: Clone,
    V::Status: Clone,
    V::Status: Clone
[src]

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

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

impl<V> Unpin for Event<V> where
    V: Unpin,
    <V as VendorEvent>::ReturnParameters: Unpin,
    <V as VendorEvent>::Status: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.