[][src]Trait galaxy_buds_live_rs::message::Payload

pub trait Payload {
    fn get_id(&self) -> u8;

    fn get_data(&self) -> Vec<u8> { ... }
fn is_response(&self) -> bool { ... }
fn to_byte_array(&self) -> Vec<u8> { ... }
fn create_header(&self, i: i32) -> [u8; 2] { ... } }

Msg defines the trait which need to be implemented by an inner message (msg).

Required methods

fn get_id(&self) -> u8

Getter for the message ID

Loading content...

Provided methods

fn get_data(&self) -> Vec<u8>

The payload data encoded for sending

fn is_response(&self) -> bool

fn to_byte_array(&self) -> Vec<u8>

Create a message byte array from a message. This is required to send a message to the buds.

fn create_header(&self, i: i32) -> [u8; 2]

Create a header for the message

Loading content...

Implementors

impl Payload for ExtendedStatusUpdate[src]

impl Payload for FindMyBud[src]

impl Payload for LockTouchpad[src]

impl Payload for MuteEarbud[src]

impl Payload for SetNoiseReduction[src]

impl Payload for SetTouchpadOption[src]

impl Payload for Simple[src]

impl Payload for StatusUpdate[src]

impl Payload for TouchUpdated[src]

impl Payload for TouchAction[src]

impl Payload for VoicewakeUpListeningStatus[src]

Loading content...