pub enum MessageType {
NBirth,
NDeath,
NData,
NCmd,
DBirth,
DDeath,
DData,
DCmd,
State,
}Expand description
A Sparkplug message type (the topic’s message_type token).
Variants§
NBirth
Edge Node birth certificate.
NDeath
Edge Node death certificate.
NData
Edge Node data.
NCmd
Edge Node command.
DBirth
Device birth certificate.
DDeath
Device death certificate.
DData
Device data.
DCmd
Device command.
State
Host Application state.
Implementations§
Source§impl MessageType
impl MessageType
Sourcepub const fn has_device(self) -> bool
pub const fn has_device(self) -> bool
Whether this message type addresses a Device (carries a device_id).
Sourcepub const fn carries_seq(self) -> bool
pub const fn carries_seq(self) -> bool
Whether a payload of this type carries a sequence number. NDEATH, NCMD,
DCMD, and STATE do not (tck-id-payloads-{ndeath,ncmd,dcmd}-seq).
Sourcepub const fn is_command(self) -> bool
pub const fn is_command(self) -> bool
Whether this is a command (NCMD/DCMD).
Trait Implementations§
Source§impl Clone for MessageType
impl Clone for MessageType
Source§fn clone(&self) -> MessageType
fn clone(&self) -> MessageType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MessageType
Source§impl Debug for MessageType
impl Debug for MessageType
Source§impl Display for MessageType
impl Display for MessageType
impl Eq for MessageType
Source§impl FromStr for MessageType
impl FromStr for MessageType
Source§impl Hash for MessageType
impl Hash for MessageType
Source§impl PartialEq for MessageType
impl PartialEq for MessageType
Source§fn eq(&self, other: &MessageType) -> bool
fn eq(&self, other: &MessageType) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MessageType
Auto Trait Implementations§
impl Freeze for MessageType
impl RefUnwindSafe for MessageType
impl Send for MessageType
impl Sync for MessageType
impl Unpin for MessageType
impl UnsafeUnpin for MessageType
impl UnwindSafe for MessageType
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