Struct mqtt::topic_name::TopicName [−][src]
pub struct TopicName(_);
Topic name
http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718106
Methods
impl TopicName
[src]
impl TopicName
pub fn new<S: Into<String>>(topic_name: S) -> Result<TopicName, TopicNameError>
[src]
pub fn new<S: Into<String>>(topic_name: S) -> Result<TopicName, TopicNameError>
Creates a new topic name from string Return error if the string is not a valid topic name
pub unsafe fn new_unchecked(topic_name: String) -> TopicName
[src]
pub unsafe fn new_unchecked(topic_name: String) -> TopicName
Creates a new topic name from string without validation
Methods from Deref<Target = TopicNameRef>
pub fn is_server_specific(&self) -> bool
[src]
pub fn is_server_specific(&self) -> bool
Check if this topic name is only for server.
Topic names that beginning with a '$' character are reserved for servers
Trait Implementations
impl Into<TopicName> for TopicNameHeader
[src]
impl Into<TopicName> for TopicNameHeader
impl Debug for TopicName
[src]
impl Debug for TopicName
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Eq for TopicName
[src]
impl Eq for TopicName
impl PartialEq for TopicName
[src]
impl PartialEq for TopicName
fn eq(&self, other: &TopicName) -> bool
[src]
fn eq(&self, other: &TopicName) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &TopicName) -> bool
[src]
fn ne(&self, other: &TopicName) -> bool
This method tests for !=
.
impl Clone for TopicName
[src]
impl Clone for TopicName
fn clone(&self) -> TopicName
[src]
fn clone(&self) -> TopicName
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Hash for TopicName
[src]
impl Hash for TopicName
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Into<String> for TopicName
[src]
impl Into<String> for TopicName
impl Deref for TopicName
[src]
impl Deref for TopicName
type Target = TopicNameRef
The resulting type after dereferencing.
fn deref(&self) -> &TopicNameRef
[src]
fn deref(&self) -> &TopicNameRef
Dereferences the value.
impl Encodable for TopicName
[src]
impl Encodable for TopicName
type Err = TopicNameError
fn encode<W: Write>(&self, writer: &mut W) -> Result<(), TopicNameError>
[src]
fn encode<W: Write>(&self, writer: &mut W) -> Result<(), TopicNameError>
Encodes to writer
fn encoded_length(&self) -> u32
[src]
fn encoded_length(&self) -> u32
Length of bytes after encoded
impl Decodable for TopicName
[src]
impl Decodable for TopicName