pub enum TopicNamespace {
SPAV1_0,
SPBV1_0,
}
Expand description
Enumerator for Sparkplugs™ topic namespace.
The MQTT-Representation can be created with the ToString::to_string-method.
assert_eq!("spAv1.0".to_string(), TopicNamespace::SPAV1_0.to_string());
assert_eq!("spBv1.0".to_string(), TopicNamespace::SPBV1_0.to_string());
The MQTT-String representation can be parsed with FromStr::from_str.
§Examples
assert_eq!(TopicNamespace::from_str("spAv1.0").unwrap(), TopicNamespace::SPAV1_0);
assert!(TopicNamespace::from_str("xyz").is_err());
Variants§
Trait Implementations§
Source§impl Clone for TopicNamespace
impl Clone for TopicNamespace
Source§fn clone(&self) -> TopicNamespace
fn clone(&self) -> TopicNamespace
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 TopicNamespace
impl Debug for TopicNamespace
Source§impl FromStr for TopicNamespace
impl FromStr for TopicNamespace
Source§impl PartialEq for TopicNamespace
impl PartialEq for TopicNamespace
Source§impl ToString for TopicNamespace
impl ToString for TopicNamespace
impl StructuralPartialEq for TopicNamespace
Auto Trait Implementations§
impl Freeze for TopicNamespace
impl RefUnwindSafe for TopicNamespace
impl Send for TopicNamespace
impl Sync for TopicNamespace
impl Unpin for TopicNamespace
impl UnwindSafe for TopicNamespace
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