[−][src]Struct galaxy_buds_live_rs::message::Message
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
fn into(self) -> ExtendedStatusUpdate
[src]
impl Into<StatusUpdate> for Message
[src]
fn into(self) -> StatusUpdate
[src]
impl Into<TouchAction> for Message
[src]
fn into(self) -> TouchAction
[src]
impl Into<TouchUpdated> for Message
[src]
fn into(self) -> TouchUpdated
[src]
impl Into<VoicewakeUpListeningStatus> for Message
[src]
fn into(self) -> VoicewakeUpListeningStatus
[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,