pub enum Message {
Login(Login),
Location(Location),
Status(Status),
Alarm(Alarm),
}Expand description
A single parsed GT06 message.
Variants§
Implementations§
Source§impl Message
impl Message
Sourcepub fn ack_bytes(&self) -> Option<[u8; 10]>
pub fn ack_bytes(&self) -> Option<[u8; 10]>
Builds the ack packet the device expects in reply to this message, if
any. None for message types the protocol doesn’t require an ack for
(location, alarm).
Sourcepub fn expects_ack(&self) -> bool
pub fn expects_ack(&self) -> bool
true if this message expects an ack reply. Equivalent to
self.ack_bytes().is_some().
Trait Implementations§
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnsafeUnpin for Message
impl UnwindSafe for Message
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more