Trait bluetooth_hci::event::VendorEvent [−][src]
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; }
Trait for vendor-specific events.
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.
Required Methods
fn new(buffer: &[u8]) -> Result<Self, Error<Self::Error>> where
Self: Sized,
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.