[][src]Struct galaxy_buds_live_rs::message::Message

pub struct Message { /* fields omitted */ }

Message contains the data of a message and its into a msg trait implementing parsed payload. In addition it contains some nice functions which are dependend on the data

Implementations

impl Message[src]

pub fn new<I: Into<Vec<u8>>>(data: I) -> Message[src]

Create a new message object from read data

pub fn get_payload_length(&self) -> i32[src]

Get the payload length of the message

pub fn is_fragment(&self) -> bool[src]

Check whether the message is a fragment or not. Fragments seem only to be used in Fota messages

pub fn is_response(&self) -> bool[src]

Checks if a message is a response

pub fn get_u8(&self) -> i32[src]

Return the header of the message

pub fn get_payload_start_index() -> usize[src]

Get the payload start index of the messages data

pub fn get_payload_bytes(&self) -> &[u8][src]

Return the bytes of the payload within the message

pub fn get_id(&self) -> u8[src]

Get the message id

Trait Implementations

impl Into<ExtendedStatusUpdate> for Message[src]

Allow parsing a Message to an ExtendedStatusUpdate

impl Into<StatusUpdate> for Message[src]

impl Into<TouchAction> for Message[src]

impl Into<TouchUpdated> for Message[src]

impl Into<VoicewakeUpListeningStatus> for Message[src]

Auto Trait Implementations

impl RefUnwindSafe for Message

impl Send for Message

impl Sync for Message

impl Unpin for Message

impl UnwindSafe for Message

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.