[][src]Struct mqtt::topic_name::TopicNameRef

pub struct TopicNameRef(_);

Reference to a topic name

Methods

impl TopicNameRef[src]

pub fn new<S: AsRef<str> + ?Sized>(
    topic_name: &S
) -> Result<&TopicNameRef, TopicNameError>
[src]

Creates a new topic name from string Return error if the string is not a valid topic name

pub unsafe fn new_unchecked<S: AsRef<str> + ?Sized>(
    topic_name: &S
) -> &TopicNameRef
[src]

Creates a new topic name from string without validation

Safety

Topic names' syntax is defined in MQTT specification. Creating a name from raw string may cause errors

pub fn is_server_specific(&self) -> bool[src]

Check if this topic name is only for server.

Topic names that beginning with a '$' character are reserved for servers

Trait Implementations

impl Debug for TopicNameRef[src]

impl Deref for TopicNameRef[src]

type Target = str

The resulting type after dereferencing.

impl Eq for TopicNameRef[src]

impl Hash for TopicNameRef[src]

impl Ord for TopicNameRef[src]

impl PartialEq<TopicNameRef> for TopicNameRef[src]

impl PartialOrd<TopicNameRef> for TopicNameRef[src]

impl StructuralEq for TopicNameRef[src]

impl StructuralPartialEq for TopicNameRef[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]