[][src]Trait bluetooth_hci::event::VendorEvent

pub trait VendorEvent {
    type Error;
    type Status: TryFrom<u8, Error = BadStatusError> + Clone + Debug;
    type ReturnParameters: VendorReturnParameters<Error = Self::Error> + Clone + Debug;
    fn new(buffer: &[u8]) -> Result<Self, Error<Self::Error>>
    where
        Self: Sized
; }

Associated Types

type Error

Enumeration of vendor-specific errors that may occur when deserializing events. Generally, this means some values in the buffer are out of range for the event.

type Status: TryFrom<u8, Error = BadStatusError> + Clone + Debug

Enumeration of vendor-specific status codes.

type ReturnParameters: VendorReturnParameters<Error = Self::Error> + Clone + Debug

Enumeration of return parameters for vendor-specific commands.

Loading content...

Required methods

fn new(buffer: &[u8]) -> Result<Self, Error<Self::Error>> where
    Self: Sized

Creates a new vendor-specific event from the contents of buffer. The buffer contains only the payload of the event, which does not include the BLE event type (which must be 0xFF) or the parameter length (which is provided by buffer.len()).

Errors

  • Shall return one of the appropriate error types (potentially including vendor-specific errors) if the buffer does not describe a valid event.
Loading content...

Implementors

Loading content...