pub enum NodeMessageType {
NBIRTH,
NDEATH,
NDATA,
NCMD,
}
Expand description
Enum for node-message types.
The string representation for use in MQTT’s topic name can produced by ToString::to_string
§Examples
assert_eq!(NodeMessageType::NBIRTH.to_string(), "NBIRTH".to_string());
For conversion from the MQTT’s topic representation use FromStr::from_str
§Examples
assert_eq!(NodeMessageType::from_str("NBIRTH").unwrap(), NodeMessageType::NBIRTH);
assert!(NodeMessageType::from_str("xyz").is_err());
Variants§
Trait Implementations§
Source§impl Clone for NodeMessageType
impl Clone for NodeMessageType
Source§fn clone(&self) -> NodeMessageType
fn clone(&self) -> NodeMessageType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for NodeMessageType
impl Debug for NodeMessageType
Source§impl FromStr for NodeMessageType
impl FromStr for NodeMessageType
Source§impl PartialEq for NodeMessageType
impl PartialEq for NodeMessageType
Source§impl ToString for NodeMessageType
impl ToString for NodeMessageType
impl StructuralPartialEq for NodeMessageType
Auto Trait Implementations§
impl Freeze for NodeMessageType
impl RefUnwindSafe for NodeMessageType
impl Send for NodeMessageType
impl Sync for NodeMessageType
impl Unpin for NodeMessageType
impl UnwindSafe for NodeMessageType
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