[][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

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 PartialOrd<TopicNameRef> for TopicNameRef[src]

impl PartialEq<TopicNameRef> for TopicNameRef[src]

impl Ord for TopicNameRef[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl Eq for TopicNameRef[src]

impl Deref for TopicNameRef[src]

type Target = str

The resulting type after dereferencing.

impl Debug for TopicNameRef[src]

impl Hash for TopicNameRef[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

Blanket Implementations

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

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

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